aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-07 05:16:34 +0000
committerGerrit Code Review <review@openstack.org>2017-02-07 05:16:34 +0000
commit2a3b8ea554dd5a3a04c7478a69387201a8475863 (patch)
tree17ba0bdcbe8c61ad4af36c8b59307b7f12ee6e3c /spec/classes
parent3c125d3c760690e0f5de25b7d27188514571332f (diff)
parent9a69201b5fd40c199468d89d7567c7869e7c5178 (diff)
Merge "Proxy API endpoints that UI uses"
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/tripleo_ui_spec.rb64
1 files changed, 43 insertions, 21 deletions
diff --git a/spec/classes/tripleo_ui_spec.rb b/spec/classes/tripleo_ui_spec.rb
index 588a944..0805e58 100644
--- a/spec/classes/tripleo_ui_spec.rb
+++ b/spec/classes/tripleo_ui_spec.rb
@@ -24,9 +24,20 @@ describe 'tripleo::ui' do
context 'with required parameters' do
let(:params) { {
- :servername => facts[:hostname],
- :bind_host => '127.0.0.1',
- :keystone_url => 'http://127.0.0.1:5000/'
+ :servername => facts[:hostname],
+ :bind_host => '127.0.0.1',
+ :endpoint_proxy_keystone => 'http://127.0.0.1:5000',
+ :endpoint_proxy_zaqar => 'ws://127.0.0.1:9000/zaqar',
+ :endpoint_proxy_heat => 'http://127.0.0.1:8004',
+ :endpoint_proxy_ironic => 'http://127.0.0.1:6385',
+ :endpoint_proxy_mistral => 'http://127.0.0.1:8989',
+ :endpoint_proxy_swift => 'http://127.0.0.1:8080',
+ :endpoint_config_keystone => 'https://127.0.0.1:443/keystone/v2.0',
+ :endpoint_config_zaqar => 'wss://127.0.0.1:443/zaqar',
+ :endpoint_config_heat => 'https://127.0.0.1:443/heat/v1/%(tenant_id)s',
+ :endpoint_config_ironic => 'https://127.0.0.1:443/ironic',
+ :endpoint_config_mistral => 'https://127.0.0.1:443/mistral/v2',
+ :endpoint_config_swift => 'https://127.0.0.1:443/swift/v1/AUTH_%(tenant_id)s'
} }
it 'should configure tripleo ui' do
@@ -42,23 +53,34 @@ describe 'tripleo::ui' do
)
is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
- .with_content(/"keystone": "http:\/\/127.0.0.1:5000\/"/)
+ .with_content(/"keystone": "https:\/\/127.0.0.1:443\/keystone\/v2.0"/)
+ .with_content(/"heat": "https:\/\/127.0.0.1:443\/heat\/v1\/%\(tenant_id\)s"/)
+ .with_content(/"zaqar-websocket": "wss:\/\/127.0.0.1:443\/zaqar"/)
+ .with_content(/"ironic": "https:\/\/127.0.0.1:443\/ironic"/)
+ .with_content(/"mistral": "https:\/\/127.0.0.1:443\/mistral\/v2"/)
+ .with_content(/"swift": "https:\/\/127.0.0.1:443\/swift\/v1\/AUTH_%\(tenant_id\)s"/)
.with_content(/"zaqar_default_queue": "tripleo"/)
end
end
context 'with all parameters' do
let(:params) { {
- :servername => 'custom.example.com',
- :bind_host => '127.0.0.2',
- :ui_port => 3001,
- :keystone_url => 'http://127.0.0.1:1111/',
- :heat_url => 'http://127.0.0.1:2222/',
- :ironic_url => 'http://127.0.0.1:3333/',
- :mistral_url => 'http://127.0.0.1:4444/',
- :swift_url => 'http://127.0.0.1:5555/',
- :zaqar_websocket_url => 'http://127.0.0.1:6666/',
- :zaqar_default_queue => 'myqueue'
+ :servername => 'custom.example.com',
+ :bind_host => '127.0.0.2',
+ :ui_port => 3001,
+ :endpoint_proxy_keystone => 'http://127.0.0.1:5000',
+ :endpoint_proxy_zaqar => 'ws://127.0.0.1:9000/zaqar',
+ :endpoint_proxy_heat => 'http://127.0.0.1:8004',
+ :endpoint_proxy_ironic => 'http://127.0.0.1:6385',
+ :endpoint_proxy_mistral => 'http://127.0.0.1:8989',
+ :endpoint_proxy_swift => 'http://127.0.0.1:8080',
+ :endpoint_config_keystone => 'https://127.0.0.1:443/keystone/v2.0',
+ :endpoint_config_zaqar => 'wss://127.0.0.1:443/zaqar',
+ :endpoint_config_heat => 'https://127.0.0.1:443/heat/v1/%(tenant_id)s',
+ :endpoint_config_ironic => 'https://127.0.0.1:443/ironic',
+ :endpoint_config_mistral => 'https://127.0.0.1:443/mistral/v2',
+ :endpoint_config_swift => 'https://127.0.0.1:443/swift/v1/AUTH_%(tenant_id)s',
+ :zaqar_default_queue => 'tripleo'
} }
it 'should configure tripleo ui' do
@@ -74,13 +96,13 @@ describe 'tripleo::ui' do
)
is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
- .with_content(/"keystone": "http:\/\/127.0.0.1:1111\/"/)
- .with_content(/"heat": "http:\/\/127.0.0.1:2222\/"/)
- .with_content(/"ironic": "http:\/\/127.0.0.1:3333\/"/)
- .with_content(/"mistral": "http:\/\/127.0.0.1:4444\/"/)
- .with_content(/"swift": "http:\/\/127.0.0.1:5555\/"/)
- .with_content(/"zaqar-websocket": "http:\/\/127.0.0.1:6666\/"/)
- .with_content(/"zaqar_default_queue": "myqueue"/)
+ .with_content(/"keystone": "https:\/\/127.0.0.1:443\/keystone\/v2.0"/)
+ .with_content(/"heat": "https:\/\/127.0.0.1:443\/heat\/v1\/%\(tenant_id\)s"/)
+ .with_content(/"zaqar-websocket": "wss:\/\/127.0.0.1:443\/zaqar"/)
+ .with_content(/"ironic": "https:\/\/127.0.0.1:443\/ironic"/)
+ .with_content(/"mistral": "https:\/\/127.0.0.1:443\/mistral\/v2"/)
+ .with_content(/"swift": "https:\/\/127.0.0.1:443\/swift\/v1\/AUTH_%\(tenant_id\)s"/)
+ .with_content(/"zaqar_default_queue": "tripleo"/)
end
end