File: keystone_federation_spec.rb

package info (click to toggle)
puppet-module-keystone 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,428 kB
  • sloc: ruby: 9,684; pascal: 295; python: 38; makefile: 10; sh: 10
file content (42 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'spec_helper'

describe 'keystone::federation' do

  let(:pre_condition) do
    <<-EOS
    class { 'keystone': }
    EOS
  end

  shared_examples_for 'keystone::federation' do
    context 'with defaults' do
      it 'should configure federation options' do
        is_expected.to contain_keystone_config('federation/trusted_dashboard').with_value('<SERVICE DEFAULT>')
        is_expected.to contain_keystone_config('federation/remote_id_attribute').with_value('<SERVICE DEFAULT>')
      end
    end

    context 'with optional parameters' do
      let :params do
        {
          :trusted_dashboards  => ['http://dashboard.example.com'],
          :remote_id_attribute => 'test_attribute',
        }
      end

      it 'should configure federation options' do
        is_expected.to contain_keystone_config('federation/trusted_dashboard').with_value(['http://dashboard.example.com'])
        is_expected.to contain_keystone_config('federation/remote_id_attribute').with_value('test_attribute')
      end
    end
  end

  on_supported_os({
  }).each do |os,facts|
    let (:facts) do
      facts.merge!(OSDefaults.get_facts({}))
    end

    it_behaves_like 'keystone::federation'
  end
end