Add the host unit testcase for the endpoints

Add the host unit testcase for the endpoints in
spec/default_spec.rb

Change-Id: If66bdd269027f5f67fb40de5590bc578b13784d8
Related-Bug: #1459493
This commit is contained in:
YangLei
2015-05-28 11:51:06 +08:00
parent 6e0b3f2ce3
commit 43ac252573

View File

@@ -56,6 +56,15 @@ describe 'openstack-common::default' do
end
end
it 'has correct host for endpoints' do
%w{identity-api identity-internal identity-admin compute-api compute-ec2-api compute-ec2-admin
compute-xvpvnc compute-novnc compute-vnc compute-metadata-api network-api network-linuxbridge
network-openvswitch image-api block-storage-api object-storage-api telemetry-api orchestration-api
orchestration-api-cfn orchestration-api-cloudwatch database-api bare-metal-api}.each do |endpoint|
expect(chef_run.node['openstack']['endpoints'][endpoint]['host']).to eq('127.0.0.1')
end
end
it 'allows bind_interface override for all bind endpoints' do
node.set['openstack']['endpoints']['bind_interface'] = 'eth1'
%w{identity-bind identity-admin-bind compute-api-bind compute-ec2-api-bind compute-ec2-admin-bind