-
Notifications
You must be signed in to change notification settings - Fork 115
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 and update installer ping test #13614
Conversation
trigger: test-robottelo |
result = target_sat.cli.Base.ping() | ||
for line in result.split('\n'): | ||
if 'Status' in line: | ||
assert 'ok' in line |
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 a weaker assertion. For example, when I stop the foreman services, I get this output and the assertion won't fail for it:
Error: Failed to open TCP connection to <FQDN>:443 (Connection refused - connect(2) for "<FQDN>" port 443)
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.
Hmmm good catch. I'll reevaluate.
@lhellebr during local testing I found that the command won't execute if services are unreachable / down. This causes the test to fail and give you the output you pasted above. So I think it should work fine the way it is. |
43838e6
to
1588a1d
Compare
trigger: test-robottelo |
What you're trying to do goes against the sense of this test. Think about it, what is the purpose of the second assertion? It will only evaluate if return code of the previous command is 0. |
I think that the purpose of this change is mainly to parse the new output of hammer ping. For hammer ping we have separate tests (https://github.com/SatelliteQE/robottelo/blob/master/tests/foreman/cli/test_ping.py) |
That being said, you're the owner of the test so feel free to merge without my ACK if you feel I'm being too harsh :) |
I was unaware of the other ping test. I'm not sure I understand the reason we have both tests. I feel inclined to remove this test since it's just a different version of the other test in test_ping.py. Thoughts @rmynar since you did the eval for this file? |
I was also unaware of the other ping test when I did the eval. However I think this one is kind of sanity test for the Installer component (i.e. "No need to continue further testing when some service fails to run after installation/upgrade"). I'm not against removing this test or moving the assertion into another testcase. Current changes seem sufficient to adapt the test to the new hammer ping output. |
(cherry picked from commit ad192b7)
Problem Statement
This test is failing on stream because hammer ping now has a couple new lines that are nested for the cache
Solution
Simplify the assertion so it's much easier.
Related Issues