bosh-stemcell 1.5.0.pre.1226 → 1.5.0.pre.1244

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/lib/bosh/stemcell/version.rb +1 -1
  2. metadata +6 -75
  3. data/.rspec +0 -3
  4. data/Berksfile +0 -3
  5. data/Berksfile.lock +0 -28
  6. data/Vagrantfile +0 -50
  7. data/bosh-stemcell.gemspec +0 -28
  8. data/spec/assets/fake-stemcell-aws.tgz +0 -0
  9. data/spec/assets/fake-stemcell-vsphere.tgz +0 -0
  10. data/spec/assets/light-fake-stemcell-aws.tgz +0 -0
  11. data/spec/bosh/monkeypatch/serverspec/backend/exec_spec.rb +0 -46
  12. data/spec/bosh/stemcell/archive_filename_spec.rb +0 -56
  13. data/spec/bosh/stemcell/archive_spec.rb +0 -123
  14. data/spec/bosh/stemcell/aws/ami_spec.rb +0 -30
  15. data/spec/bosh/stemcell/aws/light_stemcell_spec.rb +0 -94
  16. data/spec/bosh/stemcell/aws/region_spec.rb +0 -12
  17. data/spec/bosh/stemcell/builder_command_spec.rb +0 -273
  18. data/spec/bosh/stemcell/builder_options_spec.rb +0 -216
  19. data/spec/bosh/stemcell/disk_image_spec.rb +0 -163
  20. data/spec/bosh/stemcell/infrastructure_spec.rb +0 -66
  21. data/spec/bosh/stemcell/operating_system_spec.rb +0 -47
  22. data/spec/bosh/stemcell/stage_collection_spec.rb +0 -279
  23. data/spec/bosh/stemcell/stage_runner_spec.rb +0 -141
  24. data/spec/bosh/stemcell/version_spec.rb +0 -12
  25. data/spec/bosh/stemcell_spec.rb +0 -6
  26. data/spec/spec_helper.rb +0 -6
  27. data/spec/stemcells/aws_spec.rb +0 -9
  28. data/spec/stemcells/centos_spec.rb +0 -146
  29. data/spec/stemcells/go_agent_spec.rb +0 -10
  30. data/spec/stemcells/openstack_spec.rb +0 -9
  31. data/spec/stemcells/ruby_agent_spec.rb +0 -27
  32. data/spec/stemcells/ubuntu_spec.rb +0 -165
  33. data/spec/stemcells/vsphere_spec.rb +0 -9
  34. data/spec/support/rspec_fire.rb +0 -9
  35. data/spec/support/serverspec.rb +0 -4
  36. data/spec/support/spec_assets.rb +0 -11
  37. data/spec/support/stemcell_image.rb +0 -26
  38. data/spec/support/stemcell_shared_examples.rb +0 -27
  39. data/spec/support/stub_env.rb +0 -5
@@ -1,141 +0,0 @@
1
- require 'spec_helper'
2
- require 'timecop'
3
- require 'bosh/stemcell/stage_runner'
4
-
5
- module Bosh::Stemcell
6
- describe StageRunner do
7
- include FakeFS::SpecHelpers
8
-
9
- let(:shell) { instance_double('Bosh::Core::Shell', run: nil) }
10
-
11
- let(:stages) { [:stage_0, :stage_1] }
12
- let(:build_path) { '/fake/path/to/build_dir' }
13
- let(:command_env) { 'env FOO=bar' }
14
- let(:settings_file) { '/fake/path/to/settings.bash' }
15
- let(:work_path) { '/fake/path/to/work_dir' }
16
-
17
- subject(:stage_runner) do
18
- described_class.new(build_path: build_path,
19
- command_env: command_env,
20
- settings_file: settings_file,
21
- work_path: work_path)
22
- end
23
-
24
- before do
25
- Bosh::Core::Shell.stub(:new).and_return(shell)
26
-
27
- stage_runner.stub(:puts)
28
- end
29
-
30
- describe '#initialize' do
31
- it 'requires :build_path' do
32
- expect {
33
- StageRunner.new(stages: 'FAKE', command_env: 'FAKE', settings_file: 'FAKE', work_path: 'FAKE')
34
- }.to raise_error('key not found: :build_path')
35
- end
36
-
37
- it 'requires :command_env' do
38
- expect {
39
- StageRunner.new(stages: 'FAKE', build_path: 'FAKE', settings_file: 'FAKE', work_path: 'FAKE')
40
- }.to raise_error('key not found: :command_env')
41
- end
42
-
43
- it 'requires :settings_file' do
44
- expect {
45
- StageRunner.new(stages: 'FAKE', build_path: 'FAKE', command_env: 'FAKE', work_path: 'FAKE')
46
- }.to raise_error('key not found: :settings_file')
47
- end
48
-
49
- it 'requires :work_path' do
50
- expect {
51
- StageRunner.new(stages: 'FAKE', build_path: 'FAKE', command_env: 'FAKE', settings_file: 'FAKE')
52
- }.to raise_error('key not found: :work_path')
53
- end
54
- end
55
-
56
- describe '#configure' do
57
- before do
58
- stages.each do |stage|
59
- stage_dir = File.join(File.join(build_path, 'stages'), stage.to_s)
60
- FileUtils.mkdir_p(stage_dir)
61
-
62
- config_script = File.join(stage_dir, 'config.sh')
63
- FileUtils.touch(config_script)
64
- File.chmod(0700, config_script)
65
- end
66
-
67
- File.stub(executable?: true) # because FakeFs does not support :executable?
68
- end
69
-
70
- it 'prints the expected messages' do
71
- stage_runner.should_receive(:puts).with("=== Configuring 'stage_0' stage ===")
72
- stage_runner.should_receive(:puts).with("=== Configuring 'stage_1' stage ===")
73
-
74
- stage_runner.configure(stages)
75
- end
76
-
77
- it 'runs the configure script for each stage in order' do
78
- shell.should_receive(:run).
79
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_0/config.sh /fake/path/to/settings.bash 2>&1')
80
- shell.should_receive(:run).
81
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_1/config.sh /fake/path/to/settings.bash 2>&1')
82
-
83
- stage_runner.configure(stages)
84
- end
85
-
86
- context 'when a stage does not have a config.sh file' do
87
- before do
88
- FileUtils.rm('/fake/path/to/build_dir/stages/stage_0/config.sh')
89
- end
90
-
91
- it 'does not attempt to run the configure step which is missing a config.sh' do
92
- shell.should_not_receive(:run).
93
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_0/config.sh /fake/path/to/settings.bash 2>&1')
94
- shell.should_receive(:run).
95
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_1/config.sh /fake/path/to/settings.bash 2>&1')
96
-
97
- stage_runner.configure(stages)
98
- end
99
- end
100
-
101
- context 'when a stage has config.sh file which is not executable' do
102
- before do
103
- File.stub(:executable?).with('/fake/path/to/build_dir/stages/stage_1/config.sh').and_return(false)
104
- end
105
-
106
- it 'does not attempt to run the configure step which has a non-executable config.sh' do
107
- shell.should_receive(:run).
108
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_0/config.sh /fake/path/to/settings.bash 2>&1')
109
- shell.should_not_receive(:run).
110
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_1/config.sh /fake/path/to/settings.bash 2>&1')
111
-
112
- stage_runner.configure(stages)
113
- end
114
- end
115
- end
116
-
117
- describe '#apply' do
118
- it 'prints the expected messages' do
119
- Timecop.freeze do
120
- stage_runner.should_receive(:puts).with("=== Applying 'stage_0' stage ===")
121
- stage_runner.should_receive(:puts).with("== Started #{Time.now.strftime('%a %b %e %H:%M:%S %Z %Y')} ==")
122
- stage_runner.should_receive(:puts).with("=== Applying 'stage_1' stage ===")
123
- stage_runner.should_receive(:puts).with("== Started #{Time.now.strftime('%a %b %e %H:%M:%S %Z %Y')} ==")
124
-
125
- stage_runner.apply(stages)
126
- end
127
- end
128
-
129
- it 'runs the apply script for each stage in order' do
130
- FileUtils.should_receive(:mkdir_p).with(File.join(work_path, 'work')).exactly(2).times
131
-
132
- shell.should_receive(:run).
133
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_0/apply.sh /fake/path/to/work_dir/work 2>&1')
134
- shell.should_receive(:run).
135
- with('sudo env FOO=bar /fake/path/to/build_dir/stages/stage_1/apply.sh /fake/path/to/work_dir/work 2>&1')
136
-
137
- stage_runner.apply(stages)
138
- end
139
- end
140
- end
141
- end
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
- require 'bosh/stemcell/version'
3
-
4
- module Bosh::Stemcell
5
- describe VERSION do
6
- let(:bosh_version_file) do
7
- File.expand_path('../../../../BOSH_VERSION', File.dirname(__FILE__))
8
- end
9
-
10
- it { should eq(File.read(bosh_version_file).strip) }
11
- end
12
- end
@@ -1,6 +0,0 @@
1
- require 'spec_helper'
2
- require 'bosh/stemcell'
3
-
4
- describe Bosh::Stemcell do
5
- it { should be_a(Module) }
6
- end
data/spec/spec_helper.rb DELETED
@@ -1,6 +0,0 @@
1
- require 'rspec'
2
- require 'fakefs/spec_helpers'
3
-
4
- Dir.glob(File.expand_path('support/**/*.rb', File.dirname(__FILE__))).each do |support|
5
- require support
6
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'AWS Stemcell' do
4
- context 'installed by system_parameters' do
5
- describe file('/var/vcap/bosh/etc/infrastructure') do
6
- it { should contain('aws') }
7
- end
8
- end
9
- end
@@ -1,146 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'CentOs Stemcell' do
4
-
5
- it_behaves_like 'a stemcell'
6
-
7
- describe package('apt') do
8
- it { should_not be_installed }
9
- end
10
-
11
- describe package('rpm') do
12
- it { should be_installed }
13
- end
14
-
15
- context 'installed by base_centos' do
16
- {
17
- 'centos-release' => '6-4.el6.centos.10.x86_64',
18
- 'epel-release' => '6-8.noarch',
19
- }.each do |pkg, version|
20
- describe package(pkg) do
21
- it { should be_installed.with_version(version) }
22
- end
23
- end
24
-
25
- describe file('/etc/sysconfig/network') do
26
- it { should be_file }
27
- end
28
- end
29
-
30
- context 'installed by base_yum' do
31
- {
32
- 'upstart' => '0.6.5-12.el6_4.1.x86_64',
33
- 'openssl-devel' => '1.0.0-27.el6_4.2',
34
- 'lsof' => '4.82-4.el6.x86_64',
35
- 'quota' => '3.17-18.el6.x86_64',
36
- 'rsync' => '3.0.6-9.el6_4.1.x86_64',
37
- 'strace' => '4.5.19-1.17.el6.x86_64',
38
- 'iptables' => '1.4.7-9.el6.x86_64',
39
- 'sysstat' => '9.0.4-20.el6.x86_64',
40
- 'tcpdump' => '4.0.0-3.20090921gitdf3cb4.2.el6.x86_64',
41
- 'dhclient' => '4.1.1-34.P1.el6_4.1.x86_64',
42
- 'zip' => '3.0-1.el6.x86_64',
43
- 'traceroute' => '2.0.14-2.el6.x86_64',
44
- 'gdb' => '7.2-60.el6_4.1.x86_64',
45
- 'curl' => '7.19.7-37.el6_4.x86_64',
46
- 'readline-devel' => '6.0-4.el6.x86_64',
47
- 'flex' => '2.5.35-8.el6.x86_64',
48
- 'openssh-server' => '5.3p1-84.1.el6',
49
- 'wget' => '1.12-1.8.el6.x86_64',
50
- 'libxml2' => '2.7.6-12.el6_4.1.x86_64',
51
- 'libxml2-devel' => '2.7.6-12.el6_4.1.x86_64',
52
- 'libxslt' => '1.1.26-2.el6_3.1.x86_64',
53
- 'libxslt-devel' => '1.1.26-2.el6_3.1.x86_64',
54
- 'psmisc' => '22.6-15.el6_0.1.x86_64',
55
- 'unzip' => '6.0-1.el6.x86_64',
56
- 'bison' => '2.4.1-5.el6.x86_64',
57
- 'libyaml' => '0.1.3-1.el6.x86_64',
58
- 'libyaml-devel' => '0.1.3-1.el6.x86_64',
59
- 'bzip2-devel' => '1.0.5-7.el6_0.x86_64',
60
- 'libcap-devel' => '2.16-5.5.el6.x86_64',
61
- 'cmake' => '2.6.4-5.el6.x86_64',
62
- 'rpm-build' => '4.8.0-32.el6.x86_64',
63
- 'rpmdevtools' => '7.5-2.el6.noarch',
64
- 'glibc-static' => '2.12-1.107.el6_4.5.x86_64',
65
- 'runit' => '2.1.1-6.el6.x86_64',
66
- 'sudo' => '1.8.6p3-7.el6.x86_64',
67
- 'rsyslog' => '5.8.10-7.el6_4.x86_64',
68
- 'rsyslog-relp' => '5.8.10-7.el6_4.x86_64',
69
- 'nc' => '1.84-22.el6.x86_64',
70
- }.each do |pkg, version|
71
- describe package(pkg) do
72
- it { should be_installed.with_version(version) }
73
- end
74
- end
75
- end
76
-
77
- context 'installed by system_grub' do
78
- {
79
- 'grub' => '0.97-81.el6.x86_64',
80
- }.each do |pkg, version|
81
- describe package(pkg) do
82
- it { should be_installed.with_version(version) }
83
- end
84
- end
85
-
86
- %w(e2fs_stage1_5 stage1 stage2).each do |grub_stage|
87
- describe file("/boot/grub/#{grub_stage}") do
88
- it { should be_file }
89
- end
90
- end
91
- end
92
-
93
- context 'installed by system_kernel' do
94
- {
95
- 'kernel' => '2.6.32-358.23.2.el6.x86_64',
96
- 'kernel-headers' => '2.6.32-358.23.2.el6.x86_64',
97
- }.each do |pkg, version|
98
- describe package(pkg) do
99
- it { should be_installed.with_version(version) }
100
- end
101
- end
102
- end
103
-
104
- context 'installed by image_install_grub' do
105
- describe file('/etc/fstab') do
106
- it { should be_file }
107
- it { should contain 'UUID=' }
108
- it { should contain '/ ext4 defaults 1 1' }
109
- end
110
-
111
- describe file('/boot/grub/grub.conf') do
112
- it { should be_file }
113
- it { should contain 'default=0' }
114
- it { should contain 'timeout=1' }
115
- it { should contain 'title CentOS release 6.4 (Final) (2.6.32-358.23.2.el6.x86_64)' }
116
- it { should contain ' root (hd0,0)' }
117
- it { should contain ' kernel /boot/vmlinuz-2.6.32-358.23.2.el6.x86_64 ro root=UUID=' }
118
- it { should contain ' selinux=0' }
119
- it { should contain ' initrd /boot/initramfs-2.6.32-358.23.2.el6.x86_64.img' }
120
- end
121
-
122
- describe file('/boot/grub/menu.lst') do
123
- it { should be_linked_to('./grub.conf') }
124
- end
125
- end
126
-
127
- context 'installed by system_parameters' do
128
- describe file('/var/vcap/bosh/etc/operating_system') do
129
- it { should contain('centos') }
130
- end
131
- end
132
-
133
- context 'installed by bosh_harden' do
134
- describe 'disallow unsafe setuid binaries' do
135
- subject { backend.run_command('find / -xdev -perm +6000 -a -type f')[:stdout].split }
136
-
137
- it { should match_array(%w(/bin/su /usr/bin/sudo)) }
138
- end
139
-
140
- describe 'disallow root login' do
141
- subject { file('/etc/ssh/sshd_config') }
142
-
143
- it { should contain /^PermitRootLogin no$/ }
144
- end
145
- end
146
- end
@@ -1,10 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'Stemcell with Go Agent' do
4
- describe 'installed by bosh_go_agent' do
5
- describe file('/var/vcap/bosh/bin/bosh-agent') do
6
- it { should be_file }
7
- it { should be_executable }
8
- end
9
- end
10
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'OpenStack Stemcell' do
4
- context 'installed by system_parameters' do
5
- describe file('/var/vcap/bosh/etc/infrastructure') do
6
- it { should contain('openstack') }
7
- end
8
- end
9
- end
@@ -1,27 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'Stemcell with Ruby Agent' do
4
- describe 'installed by bosh_ruby' do
5
- describe command('/var/vcap/bosh/bin/ruby -r yaml -e "Psych::SyntaxError"') do
6
- it { should return_exit_status(0) }
7
- end
8
- end
9
-
10
- describe 'installed by bosh_agent' do
11
- describe command('/var/vcap/bosh/bin/ruby -r bosh_agent -e "Bosh::Agent"') do
12
- it { should return_exit_status(0) }
13
- end
14
- end
15
-
16
- context 'installed by bosh_micro' do
17
- describe file('/var/vcap/micro/apply_spec.yml') do
18
- it { should be_file }
19
- it { should contain 'deployment: micro' }
20
- it { should contain 'powerdns' }
21
- end
22
-
23
- describe file('/var/vcap/micro_bosh/data/cache') do
24
- it { should be_a_directory }
25
- end
26
- end
27
- end
@@ -1,165 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'Ubuntu Stemcell' do
4
-
5
- it_behaves_like 'a stemcell'
6
-
7
- describe package('apt') do
8
- it { should be_installed }
9
- end
10
-
11
- describe package('rpm') do
12
- it { should_not be_installed }
13
- end
14
-
15
- context 'installed by base_debootstrap' do
16
- {
17
- 'ubuntu-minimal' => '1.197',
18
- }.each do |pkg, version|
19
- describe package(pkg) do
20
- it { should be_installed.with_version(version) }
21
- end
22
- end
23
-
24
- describe file('/etc/lsb-release') do
25
- it { should be_file }
26
- it { should contain 'DISTRIB_RELEASE=10.04' }
27
- it { should contain 'DISTRIB_CODENAME=lucid' }
28
- end
29
- end
30
-
31
- context 'installed by base_apt' do
32
- {
33
- 'upstart' => '0.6.5-8',
34
- 'build-essential' => '11.4build1',
35
- 'libssl-dev' => '0.9.8k-7ubuntu8.15',
36
- 'lsof' => '4.81.dfsg.1-1build1',
37
- 'strace' => '4.5.19-2',
38
- 'bind9-host' => '1:9.7.0.dfsg.P1-1ubuntu0.10',
39
- 'dnsutils' => '1:9.7.0.dfsg.P1-1ubuntu0.10',
40
- 'tcpdump' => '4.0.0-6ubuntu3',
41
- 'iputils-arping' => '3:20071127-2ubuntu1',
42
- 'curl' => '7.19.7-1ubuntu1.3',
43
- 'wget' => '1.12-1.1ubuntu2.1',
44
- 'libcurl3' => '7.19.7-1ubuntu1.3',
45
- 'libcurl4-openssl-dev' => '7.19.7-1ubuntu1.3', # installed because of 'libcurl3-dev'
46
- 'bison' => '1:2.4.1.dfsg-3',
47
- 'libreadline6-dev' => '6.1-1',
48
- 'libxml2' => '2.7.6.dfsg-1ubuntu1.10',
49
- 'libxml2-dev' => '2.7.6.dfsg-1ubuntu1.10',
50
- 'libxslt1.1' => '1.1.26-1ubuntu1.2',
51
- 'libxslt1-dev' => '1.1.26-1ubuntu1.2',
52
- 'zip' => '3.0-2',
53
- 'unzip' => '6.0-1build1',
54
- 'nfs-common' => '1:1.2.0-4ubuntu4.2',
55
- 'flex' => '2.5.35-9',
56
- 'psmisc' => '22.10-1',
57
- 'apparmor-utils' => '2.5.1-0ubuntu0.10.04.4',
58
- 'iptables' => '1.4.4-2ubuntu2',
59
- 'sysstat' => '9.0.6-2',
60
- 'rsync' => '3.0.7-1ubuntu1.1',
61
- 'openssh-server' => '1:5.3p1-3ubuntu7',
62
- 'traceroute' => '2.0.13-2',
63
- 'libncurses5-dev' => '5.7+20090803-2ubuntu3',
64
- 'quota' => '3.17-6',
65
- 'libaio1' => '0.3.107-3ubuntu2',
66
- 'gdb' => '7.1-1ubuntu2',
67
- 'tripwire' => '2.3.1.2.0-13',
68
- 'libcap2-bin' => '1:2.17-2ubuntu1.1',
69
- 'libcap-dev' => '1:2.17-2ubuntu1.1',
70
- 'libbz2-dev' => '1.0.5-4ubuntu0.2',
71
- 'libyaml-dev' => '0.1.3-1',
72
- 'cmake' => '2.8.0-5ubuntu1',
73
- 'scsitools' => '0.10-2.1ubuntu2',
74
- 'mg' => '20090107-3',
75
- 'htop' => '0.8.3-1ubuntu1',
76
- 'module-assistant' => '0.11.2ubuntu1',
77
- 'debhelper' => '7.4.15ubuntu1',
78
- 'runit' => '2.0.0-1ubuntu4',
79
- 'sudo' => '1.7.2p1-1ubuntu5.6',
80
- 'rsyslog' => '4.2.0-2ubuntu8.1',
81
- 'rsyslog-relp' => '4.2.0-2ubuntu8.1',
82
- }.each do |pkg, version|
83
- describe package(pkg) do
84
- it { should be_installed.with_version(version) }
85
- end
86
- end
87
-
88
- describe file('/sbin/rescan-scsi-bus.sh') do
89
- it { should be_file }
90
- it { should be_executable }
91
- end
92
- end
93
-
94
- context 'installed by system_grub' do
95
- {
96
- 'grub' => '0.97-29ubuntu60.10.04.2',
97
- }.each do |pkg, version|
98
- describe package(pkg) do
99
- it { should be_installed.with_version(version) }
100
- end
101
- end
102
-
103
- %w(e2fs_stage1_5 stage1 stage2).each do |grub_stage|
104
- describe file("/boot/grub/#{grub_stage}") do
105
- it { should be_file }
106
- end
107
- end
108
- end
109
-
110
- context 'installed by system_kernel' do
111
- {
112
- 'linux-image-virtual-lts-backport-oneiric' => '3.0.0.32.20',
113
- 'linux-headers-virtual-lts-backport-oneiric' => '3.0.0.32.20',
114
- }.each do |pkg, version|
115
- describe package(pkg) do
116
- it { should be_installed.with_version(version) }
117
- end
118
- end
119
- end
120
-
121
- context 'installed by image_install_grub' do
122
- describe file('/boot/grub/grub.conf') do
123
- it { should be_file }
124
- it { should contain 'default=0' }
125
- it { should contain 'timeout=1' }
126
- it { should contain 'title Ubuntu 10.04.4 LTS (3.0.0-32-virtual)' }
127
- it { should contain ' root (hd0,0)' }
128
- it { should contain ' kernel /boot/vmlinuz-3.0.0-32-virtual ro root=UUID=' }
129
- it { should contain ' selinux=0' }
130
- it { should contain ' initrd /boot/initrd.img-3.0.0-32-virtual' }
131
- end
132
-
133
- describe file('/boot/grub/menu.lst') do
134
- before { pending 'until aws/openstack stop clobbering the symlink with "update-grub"' }
135
- it { should be_linked_to('./grub.conf') }
136
- end
137
- end
138
-
139
- context 'installed by bosh_user' do
140
- describe file('/etc/passwd') do
141
- it { should be_file }
142
- it { should contain '/home/vcap:/bin/bash' }
143
- end
144
- end
145
-
146
- context 'installed by system_parameters' do
147
- describe file('/var/vcap/bosh/etc/operating_system') do
148
- it { should contain('ubuntu') }
149
- end
150
- end
151
-
152
- context 'installed by bosh_harden' do
153
- describe 'disallow unsafe setuid binaries' do
154
- subject { backend.run_command('find / -xdev -perm +6000 -a -type f')[:stdout].split }
155
-
156
- it { should match_array(%w(/bin/su /usr/bin/sudo /usr/bin/sudoedit)) }
157
- end
158
-
159
- describe 'disallow root login' do
160
- subject { file('/etc/ssh/sshd_config') }
161
-
162
- it { should contain /^PermitRootLogin no$/ }
163
- end
164
- end
165
- end