Commit graph

19 commits

Author SHA1 Message Date
Daniel J Walsh dfd10d2bcd
podman container runlabel should pull the image if it does not exist
Since --pull is deprecated, remove it from help and hide if from --help
Also set it to true by default.

Share image pull code betweern podman image pull and podman container runlabel.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877181

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-10 10:03:06 -04:00
Daniel J Walsh 1d7d218191
Fix podman container runlabel --display
Current podman container runlabel --display is being ignored.

This is just supposed to display the command that would be run, and
then exit, but instead is actually running the command.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877186

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-09 10:45:24 -04:00
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Daniel J Walsh a75f96ae90
Turn on a bunch more remote tests
We need to be more specific about the remote tests we turn off.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-22 13:13:28 -04:00
Daniel J Walsh a10d5b42ab
Change buildtag for remoteclient to remote for testing
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 15:22:24 -04:00
Valentin Rothberg 8489dc4345 move go module to v2
With the advent of Podman 2.0.0 we crossed the magical barrier of go
modules.  While we were able to continue importing all packages inside
of the project, the project could not be vendored anymore from the
outside.

Move the go module to new major version and change all imports to
`github.com/containers/libpod/v2`.  The renaming of the imports
was done via `gomove` [1].

[1] https://github.com/KSubedi/gomove

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 15:50:12 +02:00
Valentin Rothberg 61828cf480 container runlabel
Implement container runlabel for v2.  Local client only.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-07 16:18:39 +02:00
Brent Baude 5c968b7693 Force integration tests to pass
Failing tests are now skipped and we should work from this.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 13:48:50 -05:00
Qi Wang d7c0f968ca fix bug check nonexist authfile
Use GetDefaultAuthFile() from buildah.
For podman command(except login), if authfile does not exist returns error.

close #4328

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-05 21:32:18 -05:00
Jhon Honce 60d0be17fc Refactor tests when checking for error exit codes
Rather than checking for non-zero, we need to check for >0 to
distinguish between timeouts and error exit codes.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-10-16 08:10:07 -07:00
Matthew Heon c866e441d0 Completely disable global options test
We need to cut a release. We can investigate further next week.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-14 16:33:22 -04:00
Matthew Heon 2abde1059c Skip runlabel global options test for podman-in-podman
This is failing 100% on CI. No time to debug why properly before
we need to cut a release, but is probably related to the change
from a slice to an array.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-14 15:21:46 -04:00
baude f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
Qi Wang a477a8ff75 Add variable for global flags to runlabel
use $GLOBAL_OPTS to pass global flags to the runlabel command.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-02 12:14:51 -04:00
baude d5546008ab ginkgo status improvements
a series of improvements to our ginkgo test framework so we can
get better ideas of whats going on when run in CI

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 13:28:33 -06:00
baude 735f0de633 Changes to container runlabel for toolbox project
The toolbox project would benefit from a few changes to more closely
resembe the original atomic cli project.  Changes made are:

* only pull image for container runlabel if the label exists in the image
* if a container image does not have the desired label, exit with non-zero

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:44:58 -06:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
Valentin Rothberg 606a5cec8f runlabel: run any command
As discussed [1], the runlabel command should execute any command
specified in a label.  The reasoning behind is that we cannot restrict
which options are passed to Podman which thereby has full access to the
host (runlabels must be used with care).

With the updated semantics, runlabel will substitute the commands with a
basepath equal to "docker" or "podman" with "/proc/self/exe", and
otherwise leave the command unchanged to execute any other command on
the host.

[1] https://github.com/containers/libpod/pull/1607#issuecomment-428321382

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-24 14:02:43 +02:00