diff --git a/attributes/default.rb b/attributes/default.rb index f9a9bf3..268cf55 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -30,7 +30,7 @@ default['openstack']['orchestration']['debug'] = 'False' default['openstack']['orchestration']['identity_service_chef_role'] = 'os-identity' # Gets set in the Heat Endpoint when registering with Keystone -default['openstack']['orchestration']['region'] = 'RegionOne' +default['openstack']['orchestration']['region'] = node['openstack']['region'] # The name of the Chef role that knows about the message queue server # that Heat uses diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb index fd11945..615a750 100644 --- a/spec/identity_registration_spec.rb +++ b/spec/identity_registration_spec.rb @@ -24,9 +24,22 @@ describe 'openstack-orchestration::identity_registration' do ) end - # Pending on https://review.openstack.org/#/c/59088/ it 'Register Heat Orchestration Endpoint' do - pending 'TODO: implement' + resource = @chef_run.find_resource( + 'openstack-identity_register', + 'Register Heat Orchestration Endpoint' + ).to_hash + + expect(resource).to include( + auth_uri: 'http://127.0.0.1:35357/v2.0', + bootstrap_token: 'bootstrap-token', + service_type: 'orchestration', + endpoint_region: 'RegionOne', + endpoint_adminurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s', + endpoint_internalurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s', + endpoint_publicurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s', + action: [:create_endpoint] + ) end describe 'openstack-orchestration::identity_registration-cfn' do @@ -55,7 +68,21 @@ describe 'openstack-orchestration::identity_registration' do # Pending on https://review.openstack.org/#/c/59088/ it 'Register Heat Cloudformation Endpoint' do - pending 'TODO: implement' + resource = @chef_run.find_resource( + 'openstack-identity_register', + 'Register Heat Cloudformation Endpoint' + ).to_hash + + expect(resource).to include( + auth_uri: 'http://127.0.0.1:35357/v2.0', + bootstrap_token: 'bootstrap-token', + service_type: 'cloudformation', + endpoint_region: 'RegionOne', + endpoint_adminurl: 'http://127.0.0.1:8000/v1', + endpoint_internalurl: 'http://127.0.0.1:8000/v1', + endpoint_publicurl: 'http://127.0.0.1:8000/v1', + action: [:create_endpoint] + ) end end