-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix handling of $NAME and $IMAGE in runlabel #9945
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
test/system/037-runlabel.bats
Outdated
|
||
run_podman build -t runlabel_image $tmpdir | ||
|
||
run_podman container runlabel --opt1=OPT1 --opt2=OPT2 --opt3=OPT3 --name test1 --display install runlabel_image |
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.
Just a quick once-over, but this caught my attention. Could I suggest:
opt1=opt1$(random_string 8)
optd=opt2$(random_string 10)
--opt1=$opt1 --opt2=$opt2
Or, at a minimum, --opt1=AAA --opt2=BBB
? Seeing them as OPT1
, OPT2
makes me have to triple-check the quoting in the Containerfile, make sure that OPT1
isn't appearing in the results simply as a literal.
test/system/037-runlabel.bats
Outdated
run_podman build -t runlabel_image $tmpdir | ||
|
||
run_podman container runlabel --opt1=OPT1 --opt2=OPT2 --opt3=OPT3 --name test1 --display install runlabel_image | ||
is "$output" "command: bin/podman run -t -i --rm OPT1 --privileged -v /:/host --net=host --ipc=host --pid=host -e HOST=/host -e NAME=test1 -e IMAGE=localhost/runlabel_image:latest -e CONFDIR=/etc/test1 -e LOGDIR=/var/log/test1 -e DATADIR=/var/lib/test1 localhost/runlabel_image:latest OPT2 /bin/install.sh OPT3" "generating runlabel install command" |
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.
suggestion: $PODMAN
instead of bin/podman
. This should cover all cases including podman-remote.
3ac1390
to
dedd729
Compare
Test failure looked like a flake, I've restarted. |
Fixes: containers#9405 Add system runlabel tests. Signed-off-by: Daniel J Walsh <[email protected]>
@containers/podman-maintainers PTAL |
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
LGTM |
Fixes: #9405
Add system runlabel tests.
Signed-off-by: Daniel J Walsh [email protected]