Skip to content
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

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Aug 12, 2019

Solution: add ability to specify 'kubectl' as shell transport

Copy link
Member

@rochacbruno rochacbruno left a 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

Copy link
Member

@mikedep333 mikedep333 left a 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.

pulp_smash/cli.py Outdated Show resolved Hide resolved
Copy link
Member

@mikedep333 mikedep333 left a 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

@@ -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)
Copy link
Member

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.

@@ -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) + ("--",)
Copy link
Member

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.

mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 12, 2019
Solution: add ability to specify 'kubectl' as shell transport
@dkliban dkliban merged commit 992f8c3 into pulp:master Aug 12, 2019
mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 20, 2019
mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 21, 2019
mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 26, 2019
mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 26, 2019
mikedep333 added a commit to mikedep333/pulpcore that referenced this pull request Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants