aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-05-19 17:30:47 +0000
committerGerrit Code Review <review@openstack.org>2017-05-19 17:30:47 +0000
commit3eec2c533044dc82d02946950b794338f2286746 (patch)
tree8c907054479fdecd79d672b98286064b25f0a6ce /spec
parent3c2852ccfc465fb83da8e62d67ccaa7f7e9ff08d (diff)
parent6b17c04e364bc5827ded3e4357f95cb007f73590 (diff)
Merge "Switch to overlay2 driver for storage"
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/tripleo_profile_base_docker_spec.rb59
1 files changed, 57 insertions, 2 deletions
diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb
index b52fe24..0b988f6 100644
--- a/spec/classes/tripleo_profile_base_docker_spec.rb
+++ b/spec/classes/tripleo_profile_base_docker_spec.rb
@@ -27,7 +27,10 @@ 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-sysconfig').with_changes(['rm INSECURE_REGISTRY'])
+ is_expected.to contain_augeas('docker-sysconfig').with_changes([
+ 'rm INSECURE_REGISTRY',
+ "set OPTIONS '\"--log-driver=journald --signature-verification=false\"'",
+ ])
}
end
@@ -42,7 +45,10 @@ 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-sysconfig').with_changes(["set INSECURE_REGISTRY '\"--insecure-registry foo:8787\"'"])
+ is_expected.to contain_augeas('docker-sysconfig').with_changes([
+ "set INSECURE_REGISTRY '\"--insecure-registry foo:8787\"'",
+ "set OPTIONS '\"--log-driver=journald --signature-verification=false\"'",
+ ])
}
end
@@ -69,6 +75,55 @@ describe 'tripleo::profile::base::docker' do
}
end
+ context 'with step 1 and docker_options configured' do
+ let(:params) { {
+ :docker_options => '--log-driver=syslog',
+ :step => 1,
+ } }
+
+ 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-sysconfig').with_changes([
+ "rm INSECURE_REGISTRY",
+ "set OPTIONS '\"--log-driver=syslog\"'",
+ ])
+ }
+ end
+
+ context 'with step 1 and storage_options configured' do
+ let(:params) { {
+ :step => 1,
+ :storage_options => '-s devicemapper',
+ } }
+
+ 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-sysconfig-storage').with_changes([
+ "set DOCKER_STORAGE_OPTIONS '\" #{params[:storage_options]}\"'",
+ ])
+ }
+ end
+
+ context 'with step 1 and configure_storage disabled' do
+ let(:params) { {
+ :step => 1,
+ :configure_storage => false,
+ } }
+
+ 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-sysconfig-storage').with_changes([
+ "rm DOCKER_STORAGE_OPTIONS",
+ ])
+ }
+ end
+
end
on_supported_os.each do |os, facts|