unit tests: make Keystone_endpoint match service by name/type

Since a chance in puppet-keystone (1], we now match an endpoint with a
service name/type.
)
[1] http://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=0a4e06abb0f5b3f324464ff5219d2885816311ce

Closes-Bug: #1528308

Change-Id: I24bce1e0098db64249fdf6c001ea7146af9e79e4
This commit is contained in:
Emilien Macchi 2015-12-21 20:14:46 +01:00
parent b3667a28e5
commit 2b3aa4ebe1

View File

@ -20,9 +20,8 @@ describe 'manila::keystone::auth' do
:ensure => 'present',
:roles => ['admin']
)
is_expected.to contain_keystone_service('manila').with(
is_expected.to contain_keystone_service('manila::share').with(
:ensure => 'present',
:type => 'share',
:description => 'Manila Service'
)
@ -35,20 +34,19 @@ describe 'manila::keystone::auth' do
:ensure => 'present',
:roles => ['admin']
)
is_expected.to contain_keystone_service('manilav2').with(
is_expected.to contain_keystone_service('manilav2::sharev2').with(
:ensure => 'present',
:type => 'sharev2',
:description => 'Manila Service v2'
)
end
it { is_expected.to contain_keystone_endpoint('RegionOne/manila').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/manila::share').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:8786/v1/%(tenant_id)s',
:admin_url => 'http://127.0.0.1:8786/v1/%(tenant_id)s',
:internal_url => 'http://127.0.0.1:8786/v1/%(tenant_id)s'
) }
it { is_expected.to contain_keystone_endpoint('RegionOne/manilav2').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/manilav2::sharev2').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:8786/v2/%(tenant_id)s',
:admin_url => 'http://127.0.0.1:8786/v2/%(tenant_id)s',
@ -70,13 +68,13 @@ describe 'manila::keystone::auth' do
)
end
it { is_expected.to contain_keystone_endpoint('RegionThree/manila').with(
it { is_expected.to contain_keystone_endpoint('RegionThree/manila::share').with(
:ensure => 'present',
:public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
:admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
:internal_url => 'https://10.0.42.3:4242/v42/%(tenant_id)s'
)}
it { is_expected.to contain_keystone_endpoint('RegionThree/manilav2').with(
it { is_expected.to contain_keystone_endpoint('RegionThree/manilav2::sharev2').with(
:ensure => 'present',
:public_url => 'https://10.0.42.1:4242/v43/%(tenant_id)s',
:admin_url => 'https://10.0.42.2:4242/v43/%(tenant_id)s',
@ -99,7 +97,7 @@ describe 'manila::keystone::auth' do
)
end
it { is_expected.to contain_keystone_endpoint('RegionThree/manila').with(
it { is_expected.to contain_keystone_endpoint('RegionThree/manila::share').with(
:ensure => 'present',
:public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
:admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
@ -114,7 +112,7 @@ describe 'manila::keystone::auth' do
:configure_endpoint_v2 => false
)
end
it { is_expected.to_not contain_keystone_endpoint('RegionOne/manila') }
it { is_expected.to_not contain_keystone_endpoint('RegionOne/manilav2') }
it { is_expected.to_not contain_keystone_endpoint('RegionOne/manila::share') }
it { is_expected.to_not contain_keystone_endpoint('RegionOne/manilav2::sharev2') }
end
end