-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 for issue #53274, test on Amazon Linux 1 #53323
Conversation
tests/integration/states/test_pkg.py
Outdated
@@ -488,13 +489,17 @@ def test_pkg_009_latest_with_epoch(self): | |||
if not pkgmgr_avail(self.run_function, self.run_function('grains.items')): | |||
self.skipTest('Package manager is not available') | |||
|
|||
if (grains.get('os') == 'Amazon' and grains.get('osmajorrelease') != 2): |
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 doesn't seem future proof. Maybe Amazon Linux 1 will support it in the future.
What if we test against a different package, that's available everywhere, like vim or something?
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.
Amazon Linux 1 reaches EOL June 20, 2020. I think it is a done OS at this point.
Updated to utilize bash-doc instead of bash-completion
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.
maybe to make it more future proof for all OSs, add a check to ensure the package exists, if it does not use bash-doc? what do you think about that approach @rares-pop
tests/integration/states/test_pkg.py
Outdated
@@ -506,6 +511,9 @@ def test_pkg_010_latest_with_epoch_and_info_installed(self): | |||
if not pkgmgr_avail(self.run_function, self.run_function('grains.items')): | |||
self.skipTest('Package manager is not available') | |||
|
|||
if (grains.get('os') == 'Amazon' and grains.get('osmajorrelease') != 2): |
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.
would it be possible to change the pkg name to something that is available on amazon linux 1, instead of skipping the test so we ensure we are also testing this on amazon linux 1? I believe it just needs to be a package that includes an epoch
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 shall take a look at something else that we can install but typically would not be installed by default
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.
Using bash-doc instead of unavailable bash-completion
re-run full all |
re-run full all |
re-run full all |
What does this PR do?
Disable test_pkg tests for bash-completion on Amazon Linux 1, since it does not have that package.
What issues does this PR fix or reference?
#53274
Previous Behavior
Test failures due to lack of bash-completion.
New Behavior
Skip tests involving for bash-completion if platform is Amazon Linux 1.
There is no package for bash-completion on Amazon Linux 1
Tests written?
Yes - test fixed
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.