Skip to content

Conversation

@bastelfreak
Copy link
Member

No description provided.

@bastelfreak bastelfreak force-pushed the smart branch 3 times, most recently from daf06a6 to 57cccda Compare November 28, 2025 09:53
@bastelfreak bastelfreak marked this pull request as ready for review November 28, 2025 10:45
Copy link
Member

@ekohl ekohl left a 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
end

Then you can build on that in openbolt.

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') }
Copy link
Member

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.

Suggested change
its(:stdout) { should match('discovery') }
its(:stdout) { should include('discovery') }

@ekohl
Copy link
Member

ekohl commented Dec 1, 2025

I submitted that in #888 because I wanted to see if it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants