Skip to content

Commit

Permalink
unit tests: make Keystone_endpoint match service by name/type
Browse files Browse the repository at this point in the history
Since a chance in puppet-keystone (1], we now match an endpoint with a
service name/type.
This patch reflects this change for 'alarming' service endpoint.
)
[1] http://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=0a4e06abb0f5b3f324464ff5219d2885816311ce

Depends-On: I6e411d8f81c7ae5c768d85a236c0942d265c74dd
Closes-Bug: #1528308

Change-Id: I663009b445c43868908f4c62e860647032cb647a
(cherry picked from commit 9e3e5aa160bdc8445835a198246256d47255c60a)
  • Loading branch information
EmilienM committed Dec 22, 2015
1 parent a09301a commit aaa5fd2
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions spec/classes/aodh_keystone_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
:roles => ['admin']
)}

it { is_expected.to contain_keystone_service('aodh').with(
it { is_expected.to contain_keystone_service('aodh::alarming').with(
:ensure => 'present',
:type => 'alarming',
:description => 'OpenStack Alarming Service'
) }

it { is_expected.to contain_keystone_endpoint('RegionOne/aodh').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/aodh::alarming').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:8042',
:admin_url => 'http://127.0.0.1:8042',
Expand All @@ -48,7 +47,7 @@
:admin_url => 'http://10.10.10.12:81' }
end

it { is_expected.to contain_keystone_endpoint('RegionOne/aodh').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/aodh::alarming').with(
:ensure => 'present',
:public_url => 'https://10.10.10.10:80',
:internal_url => 'http://10.10.10.11:81',
Expand All @@ -64,8 +63,8 @@

it { is_expected.to contain_keystone_user('aodhany') }
it { is_expected.to contain_keystone_user_role('aodhany@services') }
it { is_expected.to contain_keystone_service('aodhany') }
it { is_expected.to contain_keystone_endpoint('RegionOne/aodhany') }
it { is_expected.to contain_keystone_service('aodhany::alarming') }
it { is_expected.to contain_keystone_endpoint('RegionOne/aodhany::alarming') }
end

describe 'when overriding service name' do
Expand All @@ -77,8 +76,8 @@

it { is_expected.to contain_keystone_user('aodh') }
it { is_expected.to contain_keystone_user_role('aodh@services') }
it { is_expected.to contain_keystone_service('aodh_service') }
it { is_expected.to contain_keystone_endpoint('RegionOne/aodh_service') }
it { is_expected.to contain_keystone_service('aodh_service::alarming') }
it { is_expected.to contain_keystone_endpoint('RegionOne/aodh_service::alarming') }
end

describe 'when disabling user configuration' do
Expand All @@ -92,9 +91,8 @@

it { is_expected.not_to contain_keystone_user('aodh') }
it { is_expected.to contain_keystone_user_role('aodh@services') }
it { is_expected.to contain_keystone_service('aodh').with(
it { is_expected.to contain_keystone_service('aodh::alarming').with(
:ensure => 'present',
:type => 'alarming',
:description => 'OpenStack Alarming Service'
) }

Expand All @@ -112,9 +110,8 @@

it { is_expected.not_to contain_keystone_user('aodh') }
it { is_expected.not_to contain_keystone_user_role('aodh@services') }
it { is_expected.to contain_keystone_service('aodh').with(
it { is_expected.to contain_keystone_service('aodh::alarming').with(
:ensure => 'present',
:type => 'alarming',
:description => 'OpenStack Alarming Service'
) }

Expand Down

0 comments on commit aaa5fd2

Please sign in to comment.