From 43ac252573b6c996dbf98e913f54b9905402e892 Mon Sep 17 00:00:00 2001 From: YangLei Date: Thu, 28 May 2015 11:51:06 +0800 Subject: [PATCH] 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 --- spec/default_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/default_spec.rb b/spec/default_spec.rb index 329f0d41..71ad92a4 100644 --- a/spec/default_spec.rb +++ b/spec/default_spec.rb @@ -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