-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixes #13291: Add a ncf_test scenario to rtf #129
Fixes #13291: Add a ncf_test scenario to rtf #129
Conversation
ff3c235
to
b0c8bdf
Compare
Commit modified |
b0c8bdf
to
a5c16b8
Compare
Commit modified |
a5c16b8
to
bb6182f
Compare
Commit modified |
bb6182f
to
8c7f3f9
Compare
Commit modified |
8c7f3f9
to
9d3cf00
Compare
Commit modified |
@@ -802,8 +799,10 @@ class Platform: | |||
rudder_url = host.get_url() | |||
token = host.run('cat /root/rudder-token') | |||
if rudder_url is None or token is None: | |||
print("This platform has no rudder server, can't run this command") | |||
exit(2) | |||
rudder_url = '' |
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.
Tests are done on single agent, there are no server deployed.
9d3cf00
to
d79b3e6
Compare
Commit modified |
I also corrected lot of syntax typos. We are still missing a mechanism to destroy the machine if it fails for |
d79b3e6
to
c89a803
Compare
Commit modified |
""" Run a scenario on this platform """ | ||
# test ruby binary |
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.
Add a try/catch to destroy the vm if an error occured while running the scenario
process = Popen(command, shell=True, universal_newlines=True) | ||
else: | ||
process = Popen(command, stdout=PIPE, shell=True, universal_newlines=True) | ||
output, error = process.communicate() |
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 this won't work when you have no pipe at all
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.
It is working, doc says it returns None if no stdout are scpecified, which is fine here since we want the output to be print to the shell and not captured by python.https://docs.python.org/2/library/subprocess.html#subprocess.Popen.communicate
rtf
Outdated
return "https://" + adress.group(1) + "/rudder" | ||
command = "vagrant ssh-config " + self.platform + "_" + aws.group(1) | ||
process = Popen(command, stdout=PIPE, shell=True, universal_newlines=True) | ||
output, error = process.communicate() |
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 candidate for a call to the shell() function
c89a803
to
e33511d
Compare
Commit modified |
OK, merging this PR |
https://www.rudder-project.org/redmine/issues/13291