<commit_before>require 'spec_helper'

# Testing for override files created by lx_boot

# See https://github.com/joyent/illumos-joyent/blob/master/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh

## Dynamic overrides. Typically these are for network and DNS

# DNS Resolvers
describe file('/etc/resolvconf/resolv.conf.d/tail') do
	it { should be_file }
	it { should contain "# AUTOMATIC ZONE CONFIG" }
end

# Network interfaces
describe file('/etc/network/interfaces.d/smartos') do
	it { should be_file }
	it { should contain "# AUTOMATIC ZONE CONFIG" }
end

## Static overrides

describe file('/etc/init/console.override') do
	it { should be_file }
	it { should contain "CONTAINER=smartos" }
end

describe file('/etc/init/container-detect.override') do
	it { should be_file }
	its(:md5sum) { should eq 'dfd990f3a6ed9ed8582a3bae564551d9' }
end

describe file('/etc/init/mountall.override') do
	it { should be_file }
	its(:md5sum) { should eq '77e43ed540b051c9dc22df649eb7b597' }
end<commit_msg>use md5 checksm<commit_after>require 'spec_helper'

# Testing for override files created by lx_boot

# See https://github.com/joyent/illumos-joyent/blob/master/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh

## Dynamic overrides. Typically these are for network and DNS

# DNS Resolvers
describe file('/etc/resolvconf/resolv.conf.d/tail') do
	it { should be_file }
	it { should contain "# AUTOMATIC ZONE CONFIG" }
end

# Network interfaces
describe file('/etc/network/interfaces.d/smartos') do
	it { should be_file }
	it { should contain "# AUTOMATIC ZONE CONFIG" }
end

## Static overrides

describe file('/etc/init/console.override') do
	it { should be_file }
	its(:md5sum) { should eq '7ee0e4d8968d264ef99275a50e9cff20' }
end

describe file('/etc/init/container-detect.override') do
	it { should be_file }
	its(:md5sum) { should eq 'dfd990f3a6ed9ed8582a3bae564551d9' }
end

describe file('/etc/init/mountall.override') do
	it { should be_file }
	its(:md5sum) { should eq '77e43ed540b051c9dc22df649eb7b597' }
end
{'fraction_non_alphanumeric': 0.1143141153081511, 'fraction_numerical': 0.05069582504970179, 'mean_word_length': 4.801152737752162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3073246', 'n_tokens_mistral': 812, 'n_tokens_neox': 735, 'n_words': 171}