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

[NO TESTS NEEDED] Allow podman play kube to read yaml file from stdin #9420

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Feb 18, 2021

Fixes: #8996

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2021
@@ -4,12 +4,10 @@
podman-play-kube - Create pods and containers based on Kubernetes YAML

## SYNOPSIS
**podman play kube** [*options*] *file*__.yml__
**podman play kube** [*options*] **file**__.yml__|**-**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-**podman play kube** [*options*] **file**__.yml__|**-**
+**podman play kube** [*options*] *file.yml|-*

load helpers

@test "podman play with stdin" {
run_podman play kube - <<< test.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't possibly work. I have to assume that you know this, that this is simply a placeholder. (Reason: <<< means "the next argument is a string variable"; what you probably want is < $PODMAN_TMPDIR/test.yaml but you need to create that first.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

@test "podman play" {
run_podman play kube test.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, but different reason (test.yaml does not exist)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@rhatdan rhatdan force-pushed the kube branch 2 times, most recently from efe1880 to fcf09c6 Compare February 19, 2021 10:37
@rhatdan rhatdan changed the title Allow podman play kube to read yaml file from stdin [NO TESTS NEEDED] Allow podman play kube to read yaml file from stdin Feb 19, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Feb 19, 2021

This PR includes tests, but the test checker is screwed up, since it sees a rename but does not know tests were added.

Short: "Play a pod based on Kubernetes YAML.",
Long: kubeDescription,
RunE: kube,
Args: cobra.ExactArgs(1),
ValidArgsFunction: common.AutocompleteDefaultOneArg,
Example: `podman play kube nginx.yml
cat nginx.yml | podman play kube -
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great example!

@@ -4,12 +4,10 @@
podman-play-kube - Create pods and containers based on Kubernetes YAML

## SYNOPSIS
**podman play kube** [*options*] *file*__.yml__
**podman play kube** [*options*] *file.yml|-*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK, but I think we want to keep the underscores?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOOPS, I'll trust @edsantiago's earlier comment.

@TomSweeneyRedHat
Copy link
Member

LGTM
and happy green test buttons!

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2021
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 6fbf73e into containers:master Feb 22, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"podman play kube" pipe input
6 participants