-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix upstream api permission tests #14475
Fix upstream api permission tests #14475
Conversation
cls.permissions.pop('JobInvocation') | ||
cls.permissions.pop('JobTemplate') | ||
cls.permissions.pop('RemoteExecutionFeature') | ||
cls.permissions.pop('TemplateInvocation') | ||
if 'rubygem-foreman_puppet' not in rpm_packages: |
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.
There are more rpm conditions than previously. Have tests failed on these in upstream?
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.
Since upstream is defined as
# rpm -q satellite-capsule
package satellite-capsule is not installed
yes they failed.
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.
Lines 1540 to 1547 in 21580fc
@cached_property | |
def is_upstream(self): | |
"""Figure out which product distribution is installed on the server. | |
:return: True if no downstream satellite RPMS are installed | |
:rtype: bool | |
""" | |
return self.execute(f'rpm -q {self.product_rpm_name}').status != 0 |
What I got from your comment is that the current implementation of is_upstream
does not suit you. Is that correct?
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 not really have an issue with it. It is just more a check for 'not downstream satellite'.
I am not really running the tests on upstream but a different downstream so it kind of helps me I guess.
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.
@dosas is correct here that the missing presence of Satellite rpms isn't the most accurate test of whether we're in an upstream/downstream environment or not.
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.
@lhellebr To answer your original questions: Yes there are more conditions because there are also more permissions that were added.
IMO the definition of is_upstream
is out of scope of this PR.
1c15804
to
c770084
Compare
* add more checks for installed rpm packages * speedup by querying rpm -qa ony once * some tests were not update with this commit SatelliteQE@6651dd6#diff-9a55ae74469aa91ad5efb2b9068f73174467cd0c00d45abf7d35f9f2277a7632
c770084
to
6298c51
Compare
trigger: test-robottelo |
PRT Result
|
@pondrejk Why did you remove the labels? |
hi @dosas, I checked out this branch locally and ran some tests from the affected files, all seems well, prt also passes so I'm ok with merging this, thanks for the contribution. I reckoned that downstream branches would not be of interest to you, so I changed the labels. If you need those cherry picks I can put them back |
I would require 6.15.z please |
* add more checks for installed rpm packages * speedup by querying rpm -qa ony once * some tests were not update with this commit 6651dd6#diff-9a55ae74469aa91ad5efb2b9068f73174467cd0c00d45abf7d35f9f2277a7632 (cherry picked from commit 8476e50)
* add more checks for installed rpm packages * speedup by querying rpm -qa ony once * some tests were not update with this commit SatelliteQE@6651dd6#diff-9a55ae74469aa91ad5efb2b9068f73174467cd0c00d45abf7d35f9f2277a7632
Problem Statement
API permission tests failing for upstream
Solution
Relevant tests: