-
Notifications
You must be signed in to change notification settings - Fork 44
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
Problem: can't run CLI related tests on kubernetes #1215
Conversation
6ef5782
to
ddf045a
Compare
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.
LGTM 🚀
Not a blocker but my only comment is that the docstring can be updated to mention the new feature, doing it will generate the documentation with that comment on https://pulp-smash.readthedocs.io/en/latest/api/pulp_smash.cli.html
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.
We should add this as an option for the pulp-smash config generator.
Although as someone working on the CI urgently, I am OK with that being a later commit.
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.
See comment about the -- location
pulp_smash/cli.py
Outdated
@@ -276,6 +282,9 @@ def run(self, args, sudo=False, **kwargs): | |||
kwargs.setdefault("retcode") | |||
logger.debug("Running %s cmd (sudo:%s) - %s", args, sudo, kwargs) | |||
|
|||
if self._podname: | |||
args = ("kubectl", "exec", self._podname) + tuple(args) |
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.
We need -- (dash dash) at the end also.
So that we can run commands with arguments.
pulp_smash/cli.py
Outdated
@@ -276,6 +282,9 @@ def run(self, args, sudo=False, **kwargs): | |||
kwargs.setdefault("retcode") | |||
logger.debug("Running %s cmd (sudo:%s) - %s", args, sudo, kwargs) | |||
|
|||
if self._podname: | |||
args = ("kubectl", "exec", self._podname) + tuple(args) + ("--",) |
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.
The -- needs to become before the command you actually run.
[noissue] Required PR: pulp/pulp-smash#1215
Solution: add ability to specify 'kubectl' as shell transport
[noissue] Required PR: pulp/pulp-smash#1215
[noissue] Required PR: pulp/pulp-smash#1215
[noissue] Required PR: pulp/pulp-smash#1215
[noissue] Required PR: pulp/pulp-smash#1215
[noissue] Required PR: pulp/pulp-smash#1215
Solution: add ability to specify 'kubectl' as shell transport