-
Notifications
You must be signed in to change notification settings - Fork 29
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
Drop Pulpcore 3.14 & 3.15, move to 3.16 and 3.17 #249
Conversation
I just realized 3.17 states (https://docs.pulpproject.org/pulpcore/changes.html):
This still needs to be addressed in this PR. In particular with 3.16 implications. |
c3328af
to
b33b7e2
Compare
spec/acceptance/basic_spec.rb
Outdated
@@ -65,8 +65,7 @@ | |||
end | |||
|
|||
describe curl_command("https://#{host_inventory['fqdn']}/pulp/api/v3/", cacert: "#{certdir}/ca-cert.pem") do | |||
its(:response_code) { is_expected.to eq(200) } | |||
its(:body) { is_expected.not_to contain('artifacts_list') } | |||
its(:response_code) { is_expected.to eq(403) } |
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 do wonder if this is correct. Also, why is the HTTP 200 code in the other tests (plugin, content route spec).
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.
Doesn't look correct to me :)
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.
On the other hand, what it this supposed to be? The api root, listing all the endpoints? Does it work if you pass a cert/key?
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.
So what I do find odd is that it does pass in the other tests. I haven't looked into the details yet, but the inconsistency strikes me as odd.
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 think it's a side-effect of pulp/pulpcore#1593 (and I've asked in pulp-dev to make sure).
If you want to test an endpoint w/o auth, use /pulp/api/v3/status/
as we do in line 57.
That said, I am not really sure what this test is supposed to test. It was added as part of a60df53 where we implemented HTTPS handling inside this module, but it isn't saying what it's testing :(
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.
FTR, I've opened pulp/pulpcore#2340 as Grant said on IRC this was probably not an intentional change.
I do however stand by my analysis that this test as such is not giving any value to this module (while the /status
one does) and can be dropped.
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.
The idea was mostly that it showed a difference between authenticated and non-authenticated. With that you can see that certificate authentication works. That's something this module sets up. If you have a better idea of how to test auth, I'm open to suggestions.
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.
But that's exactly what it did not test, as access to /
was explicitly allowed without auth (just the content differed).
I would suggest hitting a real API endpoint like /users
or /artifacts
or /tasks
. Without auth you get status=403 and a JSON reply of {"detail":"Authentication credentials were provided."}
, with you get status=200 and some actual content.
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.
But that's exactly what it did not test, as access to
/
was explicitly allowed without auth (just the content differed).
I disagree it did not test it. By checking the difference in output I believe I was able to test it. You may be right that it happened to be a side effect. I'd be happy to merge a follow up PR.
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.
b33b7e2
to
3dc23d8
Compare
The failures look like bugs in Pulp 3.17:
|
3dc23d8
to
c9e0272
Compare
Updated the PR to only 3.16 since 3.17 is broken on EL7. |
Note to self: include enabling the pulpcore el8 module in |
c9e0272
to
0b6f2d4
Compare
eb6a9cd
to
8072d6a
Compare
8072d6a
to
574cb60
Compare
manifests/repo.pp
Outdated
@@ -19,6 +20,17 @@ | |||
notify => Anchor['pulpcore::repo'], | |||
} | |||
|
|||
if $facts['os']['release']['major'] == '8' { |
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.
if $facts['os']['release']['major'] == '8' { | |
if $facts['os']['release']['major'] != '7' { |
to match tests? (and the idea of future proofing) :)
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 copied it from here: https://github.com/theforeman/puppet-foreman/blob/9e483426c511e7a7a2648c2eaba18f50ac7df8f9/manifests/repo.pp#L44
But you're right.
This will probably fix for 3.17 theforeman/pulpcore-packaging#418 |
It did, thanks! |
574cb60
to
aa7302a
Compare
Updated:
|
aa7302a
to
3dd9f37
Compare
No description provided.