-
Notifications
You must be signed in to change notification settings - Fork 325
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
(QENG-608) Check_for_package method should not use which command #229
Conversation
@branan can you look over the solaris/sles code - I don't have a test OS for either or those to do sanity checks on? |
💚 Test passed. |
result = exec(Beaker::Command.new("rpm -i #{name}"), :acceptable_exit_codes => (0...127)) | ||
when /ubuntu|debian/ | ||
result = exec(Beaker::Command.new("dpkg -s #{name}"), :acceptable_exit_codes => (0...127)) | ||
when /solaris/ |
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 only valid on solaris 11, solaris 10 has different packaging
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.
Tested on solaris11 and solaris10 - both use pkginfo.
This is a little confusing as to which commands lists which packages (pkginfo vs pkg info):
http://stackoverflow.com/questions/18397029/solaris-11-pkginfo-vs-pkg-info
Are we going to be installing legacy packages or IPS 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.
You already switched it, but yeah - I think the right thing to do is IPS on Solaris 11 and legacy on Solaris 10.
And yes, I had my IPS commands and legacy commands backwards in my brain when I made that comment.
💚 Test passed. |
💚 Test passed. |
result = exec(Beaker::Command.new("zypper se -i --match-exact #{name}"), :acceptable_exit_codes => (0...127)) | ||
when /el-4/ | ||
@logger.debug("Package query not supported on rhel4") | ||
return False |
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.
False
isn't a class in Ruby. I think you want the keyword false
or the class FalseClass
, and maybe a test :P
💚 Test passed. |
💚 Test passed. |
Added spec test coverage. |
💚 Test passed. |
🔴 Test failed. |
retest this please |
🔴 Test failed. |
retest this please |
💚 Test passed. |
So this looks good, but I feel like I shouldn't merge it until I've manually played with it on some exotic platforms (ie, there's changes here that can't really be verified without full level integration tests that I don't believe our smoke tests are sufficient for). |
- properly differentiate between packages and commands - check_for_package updated to check for the given package name using the correct package manager per OS - added check_for_command, which uses 'which' to determine if a command is currently available - added spec test coverage for check_for_package
@justinstoller do you have an ETA here? |
🔴 Test failed. |
retest this please |
🔴 Test failed. |
retest this please |
🔴 Test failed. |
retest this please |
🔴 Test failed. |
I have run I checked that the returned boolean matched the output of the package command (if it said |
retest this please |
🔴 Test failed. |
(QENG-608) Check_for_package method should not use which command
Merged on @colinPL's recommendation :) |
the correct package manager per OS
is currently available