File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
test/integration/default/controls Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ control 'Docker configuration' do
4+ title 'should match desired lines'
5+
6+ describe file ( '/etc/default/docker' ) do
7+ it { should be_file }
8+ its ( 'owner' ) { should eq 'root' }
9+ its ( 'group' ) { should eq 'root' }
10+ its ( 'mode' ) { should cmp '0644' }
11+ its ( 'content' ) { should include 'DOCKER_OPTS="-s btrfs --dns 8.8.8.8"' }
12+ its ( 'content' ) { should include 'export http_proxy="http://172.17.42.1:3128"' }
13+ end
14+ end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ control 'Docker package' do
4+ title 'should be installed'
5+
6+ package_name =
7+ case platform [ :family ]
8+ when 'debian'
9+ 'docker-ce'
10+ # Catch remaining `linux` platforms to identify by `name` at the end
11+ when 'linux'
12+ case platform [ :name ]
13+ when 'arch'
14+ 'docker'
15+ end
16+ end
17+
18+ describe package ( package_name ) do
19+ it { should be_installed }
20+ end
21+ end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ control 'Docker service' do
4+ title 'should be running and enabled'
5+
6+ describe service ( 'docker' ) do
7+ it { should be_installed }
8+ it { should be_enabled }
9+ it { should be_running }
10+ end
11+ end
You can’t perform that action at this time.
0 commit comments