Makes dcos_cli.exec return the full process object. Marks exec_command as deprecated#74
Open
Fabs wants to merge 2 commits into
Open
Makes dcos_cli.exec return the full process object. Marks exec_command as deprecated#74Fabs wants to merge 2 commits into
Fabs wants to merge 2 commits into
Conversation
vespian
previously approved these changes
Dec 18, 2018
vespian
left a comment
Contributor
There was a problem hiding this comment.
Left one comment, nothing blocking, but it would be nice to have IMO.
a010b8b to
ad806b4
Compare
| if os.path.exists(path): | ||
| shutil.rmtree(path) | ||
|
|
||
| def exec(self, cmd: str, stdin=None, check=True) -> subprocess.CompletedProcess: |
Author
There was a problem hiding this comment.
While testing I would like to be able to run commands that I know will fail, and assert on their exit, without having to rescue from the exception. There is a behavior on the subprocess library that is to pass a boolean called check that when True, does not check for the command terminating with status code 0. I want to be able to configure this from the client of the exec function.
mainred
reviewed
Dec 21, 2018
b6b1cbe to
daebf75
Compare
Author
|
@mainred, @vespian and @adamtheturtle. This is ready for a next pass. |
mainred
reviewed
Dec 24, 2018
mainred
previously approved these changes
Dec 24, 2018
5 tasks
Author
|
So @adamtheturtle, do you think this is in a state you would merge? |
jbarrick-mesosphere
approved these changes
Mar 13, 2019
pcrews
approved these changes
Mar 13, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High-level description
This feature enables Edge-LB tests to look at the returncode of the command. It also enriches the API of cli test with the full content of the process object.
Please see #61 for context
Corresponding DC/OS tickets (obligatory)
These JIRA ticket(s) must be updated (ideally closed) in the moment this PR lands:
Related tickets (optional)
Other tickets related to this change:
There is a follow up epic with the rest of the work.
Checklist for all PRs
dcos-integration-testsin https://github.com/dcos/dcos or explain why this is not applicable:Integration tests were run and
PLEASE FILL IN THE TEMPLATE ABOVE / DO NOT REMOVE ANY SECTIONS ABOVE THIS LINE
Instructions and review process
What is the review process and when will my changes land?
All PRs require 2 approvals using GitHub's pull request reviews.
Reviewers should be:
It is best to proactively ask for 2 reviews by @mentioning the candidate reviewers in the PR comments area. The responsibility is on the developer submitting the PR to follow-up with reviewers and make sure a PR is reviewed in a timely manner.