-
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
system tests: add pod, inspect testing #6783
Conversation
|
||
# Try running another container also listening on the same port. | ||
run_podman 1 run --pod mypod --name dsfsdfsdf $IMAGE nc -l -p $port_in | ||
is "$output" "nc: bind: Address in use" \ |
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.
This might be fragile since it relies on the output of nc
, a tool we don't own
test/system/410-selinux.bats
Outdated
run_podman inspect --format='{{ .HostConfig.SecurityOpt }}' myc | ||
is "$output" ".*label=type:spc_t.*" "'podman inspect' includes type" | ||
is "$output" ".*label=level:s0.*" "'podman inspect' includes level" | ||
is "$output" ".*seccomp=unconfined.*" "'podman inspect' includes seccomp" |
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.
Does anyone know if the output of inspect
is guaranteed to be consistent? It'd be nice to do this in one single line.
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.
In ordering?
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.
Yes. In lots of iterations, both of podman inspect
and recreating the container, the only value I've seen is:
[label=type:spc_t,label=level:s0 seccomp=unconfined]
If I change the order of level
and type
, the inspect
order reflects command-line order. seccomp
is always last regardless of command-line order.
...but that doesn't prove anything; it could just be that I've been lucky so far.
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.
From the way the code is currently written, the order should never change, though that's not really an API guarantee
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.
That's good enough for me - we don't need an API guarantee, since the tests are tightly bound: any change to the code will be caught early. I've pushed a change that tests in one go. Thank you for checking!
Logging flakes for possible future analysis in-podman fedora-31 fedora-312020-06-25T16:11:59 integration_test
|
Followup to containers#6761: confirm that 'podman ps' shows the ports on a running container in a pod created with -p (not to be confused with the container itself running with -p, tested in 500-networking.bats). While we're at it, test that the port handling itself works, by sending random text to the container and making sure the container receives it. Followup to containers#6752: 'podman inspect' should show multiple security opts Signed-off-by: Ed Santiago <[email protected]>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, 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 |
LGTM |
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
Followup to #6761: confirm that 'podman ps' shows the ports
on a running container in a pod created with -p (not to
be confused with the container itself running with -p,
tested in 500-networking.bats).
While we're at it, test that the port handling itself works,
by sending random text to the container and making sure the
container receives it.
Followup to #6752: 'podman inspect' should show multiple
security opts
Signed-off-by: Ed Santiago [email protected]