-
Notifications
You must be signed in to change notification settings - Fork 130
Add openbolt acceptance test #885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
daf06a6 to
57cccda
Compare
1db81cd to
14ae15f
Compare
ekohl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps first introduce a shared example in its own commit? I suspect the following in spec/support/acceptance/examples.rb works.
shared_examples 'with 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
endThen you can build on that in openbolt.
spec/acceptance/discovery_spec.rb
Outdated
| describe command('curl -sk https://127.0.0.1:8443/features | grep -q discovery') do | ||
| 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 match('discovery') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't matter a lot, but I wonder if include is semantically better.
| its(:stdout) { should match('discovery') } | |
| its(:stdout) { should include('discovery') } |
|
I submitted that in #888 because I wanted to see if it worked. |
|
I cherry-picked your shared example and just applied it to openvox for now, so CI can pass |
Every plugin is expected to expose a feature which means it works. This uses a shared example to test it in various places.
No description provided.