Commit graph

638 commits

Author SHA1 Message Date
OpenShift Merge Robot b5b461ac28
Merge pull request #3147 from baude/testimagecache
use imagecaches for local tests
2019-05-30 21:56:26 +02:00
Matthew Heon 5a07311d9e Fix podman cp tests
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-30 10:53:52 -04:00
Matthew Heon f456825fe8 Fix bug in e2e tests for podman cp
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
Matthew Heon 431e633b48 Add test to ensure symlinks are resolved in ctr scope
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -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
OpenShift Merge Robot 294448c2ea
Merge pull request #2709 from haircommander/journald
Add libpod journald logging
2019-05-29 17:51:27 +02:00
Peter Hunt 88429242dd Add --follow to journald ctr logging
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:14:08 -04:00
Peter Hunt 51bdf29f04 Address comments
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
Peter Hunt 02f971131a Implement podman logs with log-driver journald
Add a journald reader that translates the journald entry to a k8s-file formatted line, to be added as a log line

Note: --follow with journald hasn't been implemented. It's going to be a larger undertaking that can wait.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
OpenShift Merge Robot 7b6dac300d
Merge pull request #3194 from QiWang19/cptar
fix bug dest path of copying tar
2019-05-28 16:44:58 +02:00
OpenShift Merge Robot 335a1ef160
Merge pull request #3189 from vrothberg/apparmor-fixes
Apparmor fixes
2019-05-28 16:23:48 +02:00
OpenShift Merge Robot b1d590b441
Merge pull request #3196 from giuseppe/keep-id
userns: add new option --userns=keep-id
2019-05-25 12:32:08 +02:00
OpenShift Merge Robot 3c85122faa
Merge pull request #3185 from mheon/fix_cp_test
Fix a potential flake in the tests for podman cp
2019-05-25 12:20:08 +02:00
Qi Wang bb7b0aad0e fix bug dest path of copying tar
when podman cp tar without --extract flag, if the destination already exists, or ends with path seprator, cp the tar under the directory, otherwise copy the tar named with the destination

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-24 11:51:30 -04:00
Giuseppe Scrivano f09370c68b
userns: add new option --userns=keep-id
it creates a namespace where the current UID:GID on the host is mapped
to the same UID:GID in the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 17:34:12 +02:00
Valentin Rothberg bcbf5c4894 baseline tests: apparmor with --privileged
https://github.com/containers/libpod/issues/3112 has revealed a
regression in apparmor when running privileged containers where the
profile must not be set or loaded.  Add a simple test to avoid potential
future regressions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-05-24 11:09:25 +02:00
Matthew Heon 0b571ede78 Fix a potential flake in the tests for podman cp
Instead of using the working directory, use a subdirectory of the
temporary directory created for the individual test, to prevent a
potential EEXIST for shared working directory.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-23 16:30:11 -04:00
Yiqiao Pu 3a3c558f60 Add test cases for login and logout
As logout test request login to the registry, we plan to test them
together. There are five test cases added:
1. Podman login and logout with default value
3. Podman login and logout with --authfile
2. Podman login and logout with --tls-verify
4. Podman login and logout with --cert-dir
5. Podman login and logout with multi registry

All above test cases are using docker rgistry v2

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2019-05-22 14:34:42 +08:00
OpenShift Merge Robot 488b698040
Merge pull request #3177 from mheon/duplicate_volumes
When superceding mounts, check for opposite types
2019-05-22 00:10:40 +02:00
OpenShift Merge Robot 8f43d08d96
Merge pull request #2561 from cevich/cirrus_test_images
Cirrus: Support testing of VM cache-image changes
2019-05-21 22:08:00 +02:00
Matthew Heon 43f28cdc16 Add test for image volume conflict with user volume
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-21 12:36:48 -04:00
Chris Evich c4d9b03f78
Cirrus: Overhaul/Simplify env. var setup
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Divyansh Kamboj c6f7066e77 Minor fix filtering images by label
Added test to avoid future regressions

Fix #3163

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-20 23:11:48 +05:30
Divyansh Kamboj ee3381f8f2 Minor fix splitting env vars in podman-commit
`string.Split()` splits into slice of size greater than 2
which may result in loss of environment variables

fixes #3132

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-19 06:51:30 +05:30
Chris Evich ae64e4e547
Replace root-based rootless tests
Since CI automation is now executing all tests as a regular user, there
is no need for root-based testing to run special rootless tests.  Remove
them.

However, the root-based rootless tests did include one test for exercising
the '--rootfs' option which is needed.  Add a new general, and more through
test to replace it - meaning it will be executed as root and non-root.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-16 09:44:00 -04:00
Divyansh Kamboj 2a961a7113 Add unshare to podman
This command lets the user run a command in a new user namespace like `unshare -u`.
It uses the implementation of unshare in buildah. ( fixes #1388 )

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-16 13:38:31 +05:30
OpenShift Merge Robot 95d90c1de7
Merge pull request #3127 from mheon/fix_start_race
Ensure that start() in StartAndAttach() is locked
2019-05-16 01:08:05 +02:00
Matthew Heon 5b3f3c4110 Kill os.Exit() in tests, replace with asserts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-15 16:33:08 -04:00
OpenShift Merge Robot 7ede159465
Merge pull request #3089 from baude/splittest
split remote tests from distro tests
2019-05-15 22:20:04 +02:00
baude a86aa4b1e9 split remote tests from distro tests
We want the remote tests for our distributions to be tested in a
different VM than the local tests.  This allows for faster CI runs and
easier debug as well as seperation of flakes.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-13 12:17:55 -05:00
OpenShift Merge Robot 2ded1f6199
Merge pull request #2705 from adrianreber/ci-test
Enabling checkpoint/restore testing on Fedora >= 29 again
2019-05-13 15:58:39 +02:00
OpenShift Merge Robot d2571c7fd4
Merge pull request #3105 from mheon/use_ctr_remove_funcs
Use standard remove functions for removing pod ctrs
2019-05-12 19:12:24 +02:00
Matthew Heon 952f8620b6 Add fix for an issue breaking our CI
Buildah no longer updates the create time of single-action images
(e.g. `FROM ...` with no other instructions. This isn't a bug (it
matches Docker's behavior), but it broke one of our tests.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-10 16:12:09 -04:00
OpenShift Merge Robot d54a2d2f81
Merge pull request #3041 from QiWang19/cpdash
implement cp reads tar file from stdin/to stdout
2019-05-09 19:35:53 +02:00
Qi Wang 4479b8eec3 implement cp reads tar file from stdin/stdout
enables podman cp uses - to stream a tar archive from STDIN or to STDOUT.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-05-09 10:12:39 -04:00
Jhon Honce d202e010af Add information when running podman version on client
* Include service version information and headers

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-05-08 11:29:03 -07:00
Chris Evich 49406da9bd
Add negative command-line test
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-08 11:04:37 -04:00
baude bc7b1ca03d enable integration tests for remote-client
first pass at enabling a swath of integration tests for the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 14:06:02 -05:00
Matthew Heon f881e32f12 Remove tests for deprecated podman-refresh command
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-06 15:26:54 -04:00
Adrian Reber 76df31830c
Only run checkpoint/restore tests on Fedora >= 29
Only Fedora 29 and newer has an updated container-selinux and
selinux-policy new enough to support CRIU in restoring threaded
processes in a container with SELinux enabled.

Also skip checkpoint/restore tests if rootless. CRIU requires root.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-05-06 13:02:52 +02:00
Matthew Heon d3286952e6 Try and fix restart-policy tests
Theory: it's SELinux blowing up and preventing us from creating
files as the container. Try and use a fresh dir and :Z to fix.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-03 14:38:41 -04:00
Matthew Heon e1443fe05d Add a test for restart policy
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-03 10:36:16 -04:00
OpenShift Merge Robot 0eaba2d56a
Merge pull request #3034 from vrothberg/top-fallback
top: fallback to execing ps(1)
2019-05-03 15:16:53 +02:00
OpenShift Merge Robot a7809fabe5
Merge pull request #2905 from QiWang19/globalvar
Add variable for global flags to runlabel
2019-05-03 11:30:51 +02:00
Valentin Rothberg 0d2d523390 top: fallback to execing ps(1)
Fallback to executing ps(1) in case we hit an unknown psgo descriptor.
This ensures backwards compatibility with docker-top, which was purely
ps(1) driven.

Also support comma-separated descriptors as input.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-05-03 11:20:16 +02:00
OpenShift Merge Robot f3c494eb28
Merge pull request #2959 from mheon/merge_volume_flags
Merge volume flags implementation
2019-05-03 01:30:13 +02:00
baude c18ad2bfd9 Generate systemd unit files for containers
the podman generate systemd command will generate a systemd unit file
based on the attributes of an existing container and user inputs.  the
command outputs the unit file to stdout for the user to copy or
redirect.  it is enabled for the remote client as well.

users can set a restart policy as well as define a stop timeout
override for the container.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-02 14:35:53 -05:00
Matthew Heon bb564b68e1 Fix podman-in-podman volume test
When running inside Podman, we get an extra `nodev` mount option.
It doesn't seem to be a bug, more an artifact of running in a
somewhat locked-down container. So instead of checking explicitly
for a set of mount options, just verify the ones we set are
present.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-02 15:17:03 -04: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
Matthew Heon 0b2c9c2acc Add basic structure of podman init command
As part of this, rework the number of workers used by various
Podman tasks to match original behavior - need an explicit
fallthrough in the switch statement for that block to work as
expected.

Also, trivial change to Podman cleanup to work on initialized
containers - we need to reset to a different state after cleaning
up the OCI runtime.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 11:12:24 -04:00