From 8c39646bc2822181bd2f60aa9ae5fffef496698e Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Thu, 10 Aug 2017 18:16:46 +0200 Subject: Allow configuring multiple insecure registries If we're using local registries, we may want to use different registries e.g. for Ceph and for OpenStack. We allow multiple registries in general for this purpose, and we should also allow it in the insecure registry configuration. Change-Id: I5cddd20a123a85516577bde1b793a30d43171285 Related-Bug: #1709310 --- spec/classes/tripleo_profile_base_docker_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec/classes') diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb index 2a15362..146d784 100644 --- a/spec/classes/tripleo_profile_base_docker_spec.rb +++ b/spec/classes/tripleo_profile_base_docker_spec.rb @@ -50,6 +50,19 @@ describe 'tripleo::profile::base::docker' do } end + context 'with step 1 and insecure_registries configured' do + let(:params) { { + :insecure_registries => ['foo:8787', 'bar'], + :step => 1, + } } + + it { + is_expected.to contain_augeas('docker-sysconfig-registry').with_changes([ + "set INSECURE_REGISTRY '\"--insecure-registry foo:8787 --insecure-registry bar\"'", + ]) + } + end + context 'with step 1 and insecure_registry configured but no docker_namespace' do let(:params) { { :insecure_registry => true, -- cgit 1.2.3-korg