diff --git a/examples/openbolt.pp b/examples/openbolt.pp new file mode 100644 index 000000000..3f456c669 --- /dev/null +++ b/examples/openbolt.pp @@ -0,0 +1,2 @@ +include foreman_proxy +include foreman_proxy::plugin::openbolt diff --git a/spec/acceptance/openbolt_spec.rb b/spec/acceptance/openbolt_spec.rb new file mode 100644 index 000000000..5d583a446 --- /dev/null +++ b/spec/acceptance/openbolt_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper_acceptance' + +describe 'Scenario: install foreman-proxy with openbolt plugin' do + before(:context) { purge_foreman_proxy } + + include_examples 'the example', 'openbolt.pp' + + it_behaves_like 'the default foreman proxy application' + + it_behaves_like 'the exposed feature', 'openbolt' +end diff --git a/spec/support/acceptance/examples.rb b/spec/support/acceptance/examples.rb index 79f61a9fd..a93a31af9 100644 --- a/spec/support/acceptance/examples.rb +++ b/spec/support/acceptance/examples.rb @@ -12,3 +12,13 @@ it { is_expected.to be_listening } end end + +shared_examples 'the exposed feature' do |feature| + let(:feature) { feature } + + cert_dir = '/etc/foreman-proxy' + describe curl_command("https://#{host_inventory['fqdn']}:8443/features", cacert: "#{cert_dir}/certificate.pem", cert: "#{cert_dir}/certificate.pem", key: "#{cert_dir}/key.pem") do + its(:stdout) { should include(feature) } + its(:exit_status) { should eq 0 } + end +end