aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2017-08-24 10:07:23 -0600
committerAlex Schultz <aschultz@redhat.com>2017-08-29 02:20:40 +0000
commite6f31aa6a8d88bc0b0b0f7ae44a8dad1b16d6a50 (patch)
tree472d4e4af2bc2f25b3922bbf09cf6fb21f4db435 /spec/classes
parent8a98b52cc86311fe8f1a6c1c420ee5215017309c (diff)
Enable config for docker daemon debug
Exposes a way to configure the docker daemon with debug enabled. Change-Id: I654a70c8bb7753679be83d78ca653ed44c3a7395 Related-Bug: #1710533 (cherry picked from commit 44b90c9a79146139cbcbe7f560bd1df667cca780)
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/tripleo_profile_base_docker_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb
index 146d784..328948e 100644
--- a/spec/classes/tripleo_profile_base_docker_spec.rb
+++ b/spec/classes/tripleo_profile_base_docker_spec.rb
@@ -82,10 +82,32 @@ describe 'tripleo::profile::base::docker' do
it { is_expected.to contain_package('docker') }
it { is_expected.to contain_service('docker') }
it {
- is_expected.to contain_augeas('docker-daemon.json').with_changes(['set dict/entry[. = "registry-mirrors"] "registry-mirrors', "set dict/entry[. = \"registry-mirrors\"]/array/string \"http://foo/bar\""])
+ is_expected.to contain_augeas('docker-daemon.json').with_changes(
+ ['set dict/entry[. = "registry-mirrors"] "registry-mirrors',
+ "set dict/entry[. = \"registry-mirrors\"]/array/string \"http://foo/bar\"",
+ 'set dict/entry[. = "debug"] "debug"',
+ "set dict/entry[. = \"debug\"]/const \"false\""])
}
end
+ context 'with step 1 and docker debug' do
+ let(:params) { {
+ :step => 1,
+ :debug => true,
+ } }
+
+ it { is_expected.to contain_class('tripleo::profile::base::docker') }
+ it { is_expected.to contain_package('docker') }
+ it { is_expected.to contain_service('docker') }
+ it {
+ is_expected.to contain_augeas('docker-daemon.json').with_changes(
+ ['rm dict/entry[. = "registry-mirrors"]',
+ 'set dict/entry[. = "debug"] "debug"',
+ "set dict/entry[. = \"debug\"]/const \"true\""])
+ }
+ end
+
+
context 'with step 1 and docker_options configured' do
let(:params) { {
:docker_options => '--log-driver=syslog',