puppet-swift/spec/classes/swift_proxy_s3token_spec.rb
zhulingjie ecf9394d98 Replace port 35357 with 5000
Now that the v2.0 API has been removed, we don't have a reason to
include deployment instructions for two separate applications on
different ports.

Change-Id: I518cc1e80f870122ecff450f792f6a16ca56a9a3
2018-05-29 11:48:08 -04:00

45 lines
1.3 KiB
Ruby

require 'spec_helper'
describe 'swift::proxy::s3token' do
shared_examples 'swift::proxy::s3token' do
describe "when using default parameters" do
it { is_expected.to contain_swift_proxy_config('filter:s3token/use').with_value('egg:swift#s3token') }
it { is_expected.to contain_swift_proxy_config('filter:s3token/auth_uri').with_value('http://127.0.0.1:5000') }
end
describe "when overriding default parameters" do
let :params do
{
:auth_protocol => 'https',
:auth_host => '192.168.4.2',
:auth_port => '3452'
}
end
it { is_expected.to contain_swift_proxy_config('filter:s3token/auth_uri').with_value('https://192.168.4.2:3452') }
end
describe "when overriding default parameters" do
let :params do
{
:auth_uri => 'http://192.168.24.11:5000'
}
end
it { is_expected.to contain_swift_proxy_config('filter:s3token/auth_uri').with_value('http://192.168.24.11:5000') }
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts())
end
it_configures 'swift::proxy::s3token'
end
end
end