-
Notifications
You must be signed in to change notification settings - Fork 271
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
add rh_cloud acceptance test #1206
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'Scenario: install foreman with rh_cloud', if: os[:family] == 'redhat' do | ||
before(:context) { purge_foreman } | ||
|
||
it_behaves_like 'an idempotent resource' do | ||
let(:manifest) do | ||
<<-PUPPET | ||
yumrepo { 'katello': | ||
baseurl => "http://yum.theforeman.org/katello/nightly/katello/el${facts['os']['release']['major']}/x86_64/", | ||
gpgcheck => 0, | ||
} | ||
yumrepo { 'candlepin': | ||
baseurl => "https://yum.theforeman.org/candlepin/4.4/el${facts['os']['release']['major']}/x86_64/", | ||
gpgcheck => 0, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the repetition I'm starting to wonder if we should have a common place for this. Perhaps use katello::repo, though that still doesn't give you candlepin. In the past I've thought about expanding Another thing to keep in mind is that this test leaves the repository enabled, so you're already in a weird state where it may or may not be enabled during a test. If you take that logic to the extreme, it may be OK to enabled it in the spec helper at the start of the run. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I thought so too -- spec helper seems fine enogh. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved to spec helper, as the acceptance tests here are not to prove our repoclosure ;-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There is some aspect to this, but the installer also installs some packages in combinations that repoclosure can't quite understand. Still, I'm good with it. I even thought about moving all Katello packages into plugins to get away from the whole problem. |
||
|
||
include foreman | ||
include foreman::plugin::rh_cloud | ||
PUPPET | ||
end | ||
end | ||
|
||
it_behaves_like 'the foreman application' | ||
end |
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.
I still wonder if this should be
redhat
or a list? Look at the other code that is['debian', 'ubuntu'].include?(os[:family])
.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 gets executed on both CentOS Stream and Alma (I verified that), so 🤷♀️
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.
This is the reason we drink ;)