]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/keystone/spec/classes/keystone_spec.rb
Update to Kilo
[dsa-puppet.git] / 3rdparty / modules / keystone / spec / classes / keystone_spec.rb
index 89c4fc55e51580dc276da1f256c384e41c733a72..c9537dc089cf058f68eef0927ed4d6ed4b040811 100644 (file)
@@ -93,6 +93,7 @@ describe 'keystone' do
       'rabbit_host'           => '127.0.0.1',
       'rabbit_password'       => 'openstack',
       'rabbit_userid'         => 'admin',
+      'default_domain'        => 'other_domain',
     }
 
   httpd_params = {'service_name' => 'httpd'}.merge(default_params)
@@ -211,6 +212,10 @@ describe 'keystone' do
         is_expected.to contain_keystone_config('DEFAULT/public_workers').with_value('2')
       end
     end
+
+    if param_hash['default_domain']
+      it { is_expected.to contain_keystone_domain(param_hash['default_domain']).with(:is_default => true) }
+    end
   end
 
   [default_params, override_params].each do |param_hash|
@@ -845,6 +850,32 @@ describe 'keystone' do
     end
   end
 
+  describe 'when configuring default domain' do
+    describe 'with default config' do
+      let :params do
+        default_params
+      end
+      it { is_expected.to_not contain_exec('restart_keystone') }
+    end
+    describe 'with default domain and service is managed and enabled' do
+      let :params do
+        default_params.merge({
+          'default_domain'=> 'test',
+        })
+      end
+      it { is_expected.to contain_exec('restart_keystone') }
+    end
+    describe 'with default domain and service is not managed' do
+      let :params do
+        default_params.merge({
+          'default_domain' => 'test',
+          'manage_service' => false,
+        })
+      end
+      it { is_expected.to_not contain_exec('restart_keystone') }
+    end
+  end
+
   context 'on RedHat platforms' do
     let :facts do
       global_facts.merge({