-
Notifications
You must be signed in to change notification settings - Fork 25
/
plugin_ansible_spec.rb
32 lines (29 loc) · 1.33 KB
/
plugin_ansible_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'spec_helper'
describe 'pulpcore::plugin::ansible' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }
let(:pre_condition) { 'include pulpcore' }
let(:expected_vhost_content) do
<<CONTENT
ProxyPass /pulp_ansible/galaxy/ unix:///run/pulpcore-api.sock|http://pulpcore-api/pulp_ansible/galaxy/
ProxyPassReverse /pulp_ansible/galaxy/ unix:///run/pulpcore-api.sock|http://pulpcore-api/pulp_ansible/galaxy/
CONTENT
end
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('pulpcore-plugin(ansible)') }
it { is_expected.to contain_pulpcore__plugin('ansible') }
it do
is_expected.to compile.with_all_deps
is_expected.to contain_pulpcore__plugin('ansible')
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
is_expected.to contain_apache__vhost__fragment('pulpcore-https-plugin-ansible')
.with_content(expected_vhost_content)
is_expected.to contain_concat__fragment('plugin-ansible')
.with_content(%r{^ANSIBLE_API_HOSTNAME = "https://foo.example.com"})
.with_content(%r{^ANSIBLE_CONTENT_HOSTNAME = "https://foo.example.com/pulp/content"})
end
end
end
end