summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* System tests: make sure exec pid hash w/o leakingAlex Jia2019-10-18
| | | | | | | | | | podman exec leaks an exec_pid_<hash> file for every exec in tmpfs, it's known rhbz#1731117, this case makes sure leakage issue has been fixed. rhbz: https://bugzilla.redhat.com/show_bug.cgi?id=1731117 Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
* Refactor tests when checking for error exit codesJhon Honce2019-10-16
| | | | | | | 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>
* Add a MissingRuntime implementationMatthew Heon2019-10-15
| | | | | | | | | | | | | | | | | When a container is created with a given OCI runtime, but then it is uninstalled or removed from the configuration file, Libpod presently reacts very poorly. The EvictContainer code can potentially remove these containers, but we still can't see them in `podman ps` (aside from the massive logrus.Errorf messages they create). Providing a minimal OCI runtime implementation for missing runtimes allows us to behave better. We'll be able to retrieve containers from the database, though we still pop up an error for each missing runtime. For containers which are stopped, we can remove them as normal. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* inspect: rename ImageID go field to ImageValentin Rothberg2019-10-15
| | | | | | | | | | | | | | The json field is called `Image` while the go field is called `ImageID`, tricking users into filtering for `Image` which ultimately results in an error. Hence, rename the field to `Image` to align json and go. To prevent podman users from regressing, rename `Image` to `ImageID` in the specified filters. Add tests to prevent us from regressing. Note that consumers of the go API that are using `ImageID` are regressing; ultimately we consider it to be a bug fix. Fixes: #4193 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* images: empty list is valid json with --format=jsonGiuseppe Scrivano2019-10-11
| | | | | | | | | similar change to f7d55d64e7040cdad149684234ea150b0a90cf0e with images --format=json, be sure the output is valid json also when it is an empty list. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #4238 from giuseppe/rootless-enable-ps-size-testsOpenShift Merge Robot2019-10-11
|\ | | | | tests: enable ps --size tests for rootless
| * tests: enable ps --size tests for rootlessGiuseppe Scrivano2019-10-11
| | | | | | | | | | | | | | rootless podman is using a single user namespace for all the containers so it can safely access the storage for all of them. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #4237 from giuseppe/ps-not-nullOpenShift Merge Robot2019-10-11
|\ \ | |/ |/| container: initialize results list
| * container: initialize results listGiuseppe Scrivano2019-10-11
| | | | | | | | | | | | | | | | | | it solves: $ podman ps --format=json null Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #4206 from giuseppe/systemd-mode-look-full-pathOpenShift Merge Robot2019-10-10
|\ \ | | | | | | systemd: expect full path /usr/sbin/init
| * | systemd: expect full path /usr/sbin/initGiuseppe Scrivano2019-10-09
| |/ | | | | | | | | | | | | | | | | | | | | | | "init" is a quite common name for the command executed in a container image and Podman ends up using the systemd mode also when not required. Be stricter on enabling the systemd mode and not enable it automatically when the basename is "init" but expect the full path "/usr/sbin/init". Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #4181 from cevich/start_test_slower_pollOpenShift Merge Robot2019-10-10
|\ \ | |/ |/| Raise start_test polling interval
| * Raise start_test polling intervalChris Evich2019-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation https://onsi.github.io/gomega/#eventually > the default value for the polling interval is 10 milliseconds That is excessively fast given the observed failures in issue #4021 are always using podman-remote. Lower the interval to 3-seconds, which should be plenty long enough for container removal. Signed-off-by: Chris Evich <cevich@redhat.com>
* | podman network create: validate user inputMrigank Krishan2019-10-04
| | | | | | | | | | | | | | Disallow invalid/confusing names such as '../bar' or 'foo ' Closes #4184 Signed-off-by: Mrigank Krishan <mrigankkrishan@gmail.com>
* | Merge pull request #4174 from cevich/use_bash_not_shOpenShift Merge Robot2019-10-03
|\ \ | | | | | | System-tests: Use bash explicitly
| * | System-tests: Use bash explicitlyChris Evich2019-10-02
| |/ | | | | | | | | | | | | On Ubuntu, /bin/sh != /bin/bash. Update system-tests to only use bash for testing consistency across platforms. Signed-off-by: Chris Evich <cevich@redhat.com>
* / system tests: info: deal with hyphen in usernameEd Santiago2019-10-03
|/ | | | | | | | ...e.g. cloud-user. 9822f54ac was intended to fix this, but it doesn't. Simple and standard solution is to move the dash to the end of the character class. Signed-off-by: Ed Santiago <santiago@redhat.com>
* system tests: reenable skipped testsEd Santiago2019-10-02
| | | | | | | | | Issue #3829 (cp symlinks) has been fixed: enable tests for it And, it looks like podman-remote is now handling exit status of a force-rm'ed container. Enable that test too. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #4001 from kunalkushwaha/podman-import-fixOpenShift Merge Robot2019-09-30
|\ | | | | podman import syntax fix
| * new testcase for podman import --change addedKunal Kushwaha2019-09-27
| | | | | | | | Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
* | Merge pull request #4118 from cevich/fix_sig_proxyOpenShift Merge Robot2019-09-27
|\ \ | | | | | | Move noCache logic lower in stack
| * | Move noCache logic lower in stackChris Evich2019-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One or more tests are not taking advantage of the local image cache. This has been observed to cause a testing flake in at least one `--sigproxy` test which uses `PodmanTestIntegration.PodmanPID()`. It has a rather short timeout of 15-seconds, which isn't always enough time to pull down a remote image. Fix this by reloacing the `noCache` logic from `PodmanTest.PodmanAsUserBase()` down the stack into `PodmanTestIntegration.makeOptions()`. This also eliminates the need to also check if a remote-client is being used - since it uses a different function. Also reverse the parameter order in `PodmanTest.PodmanBase` so that everywhere is consistently `noEvents` then `noCache`. Signed-off-by: Chris Evich <cevich@redhat.com>
* | | Merge pull request #4121 from jwhonce/issue/4021OpenShift Merge Robot2019-09-27
|\ \ \ | | | | | | | | Change ginkgo Wait() to Eventually() test
| * | | Change ginkgo Wait() to Eventually() testJhon Honce2019-09-26
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Changing the test in WaitWithDefaultTimeout() to use Eventually() and gexec.Exit(). Using ExitCode() before command has really exited returns a -1, which can cause issues for tests testing for podman to return non-zero values. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / / Correct use of reexec.Init()Nalin Dahyabhai2019-09-26
|/ / | | | | | | | | | | | | A true result from reexec.Init() isn't an error, but it indicates that main() should exit with a success exit status. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | fix cp none exists dest path ends with '/'Qi Wang2019-09-25
| | | | | | | | | | | | | | close #3894 This patch let podman cp return 'no such file or directory' error if DEST_PATH does not exist and ends with / when copying file. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Handle conflict between volumes and --read-only-tmpfsMatthew Heon2019-09-24
| | | | | | | | | | | | | | | | | | | | When a named volume is mounted on any of the tmpfs filesystems created by read-only tmpfs, it caused a conflict that was not resolved prior to this. Fixes BZ1755119 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3756 from gabibeyer/rootlessOrderingOpenShift Merge Robot2019-09-24
|\ \ | | | | | | rootless: Rearrange setup of rootless containers
| * | add list mount testsgabi beyer2019-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two unit tests to determine whether mounts are being listed correctly. One tests that a created container is not listed until mounted. The second checks that running containers are mounted, and then no longer listed as mounted when they stop running. The final test creates three containers, mounts two, and checks that mount correctly only lists the two mounted. Signed-off-by: gabi beyer <gabrielle.n.beyer@intel.com>
* | | system tests: run test: reenable and fixEd Santiago2019-09-24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test had incorrectly been disabled for all podman; it should've been disabled only for podman-remote. Fixed that, and fixed the problem that was causing failures: podman-remote is gobbling up stdin (#4095), so no tests were actually being run at all, or only one. Fixed by redirecting input on the run_podman invocation. Added, as backup, a confirmation mechanism to ensure that all expected tests are being run. Note that test is reenabled, but the output check is disabled for podman-remote due to #4096; this at least lets us check exit status. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | execuser: look at the source for /etc/{passwd,group} overridesGiuseppe Scrivano2019-09-21
| | | | | | | | | | | | | | | | | | look if there are bind mounts that can shadow the /etc/passwd and /etc/group files. In that case, look at the bind mount source. Closes: https://github.com/containers/libpod/pull/4068#issuecomment-533782941 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | container: make sure $HOME is always setGiuseppe Scrivano2019-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | If the HOME environment variable is not set, make sure it is set to the configuration found in the container /etc/passwd file. It was previously depending on a runc behavior that always set HOME when it is not set. The OCI runtime specifications do not require HOME to be set so move the logic to libpod. Closes: https://github.com/debarshiray/toolbox/issues/266 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | System-test: Temporarily disable 030-runChris Evich2019-09-17
| | | | | | | | | | | | | | | | | | | | While investigating issue https://github.com/containers/libpod/issues/4044 there is no sense subjecting forward progress elsewhere. Skip the test with a note temporarily, until a resolution to 4044 and any other related issues is found and fix implemented. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Fix exit code failureDaniel J Walsh2019-09-17
| | | | | | | | | | | | Be less precise on the exit code and lot the exit code to the journal when it fails. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #4043 from haircommander/preserve-fd-fixOpenShift Merge Robot2019-09-16
|\ \ | | | | | | exec: fix --preserve-fds
| * | exec: fix --preserve-fdsPeter Hunt2019-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems with preserve fds. libpod didn't open the fds before passing _OCI*PIPE to conmon. This caused libpod to talk on the preserved fds, rather than the pipes, with conmon talking on the pipes. This caused a hang. Libpod also didn't convert an int to string correctly, so it would further fail. Fix these and add a unit test to make sure we don't regress in the future Note: this test will not pass on crun until crun supports --preserve-fds Signed-off-by: Peter Hunt <pehunt@redhat.com>
* | | Merge pull request #3941 from gabibeyer/fix_unit_testOpenShift Merge Robot2019-09-16
|\ \ \ | |/ / |/| | fix unit test using strings.Contains
| * | fix unit test to use Expectgabi beyer2019-09-12
| |/ | | | | | | | | | | | | | | The Expect function does not return a result of True or False depending on the value of the first instance, but instead requires a comparison using ".To(", so change to use ".To(ContainSubstring(" Signed-off-by: gabi beyer <gabrielle.n.beyer@intel.com>
* | Merge pull request #3934 from rhatdan/waitOpenShift Merge Robot2019-09-13
|\ \ | | | | | | Podman-remote run should wait for exit code
| * | Podman-remote run should wait for exit codeDaniel J Walsh2019-09-12
| | | | | | | | | | | | | | | | | | | | | | | | This change matches what is happening on the podman local side and should eliminate a race condition. Also exit commands on the server side should start to return to client. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * | Use exit code constantsDaniel J Walsh2019-09-12
| |/ | | | | | | | | | | | | We have leaked the exit number codess all over the code, this patch removes the numbers to constants. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Do not support wildcards on cpJhon Honce2019-09-12
| | | | | | | | | | | | | | * symlink processing and wildcarding led to unexpected files being copied Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Test that PTYs created by 'podman exec --tty' have the ONLCR flagDebarshi Ray2019-09-12
|/ | | | Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
* Merge pull request #3927 from openSUSE/manager-annotationsOpenShift Merge Robot2019-09-11
|\ | | | | Add `ContainerManager` annotation to created containers
| * Add `ContainerManager` annotation to created containersSascha Grunert2019-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the following annotation to every container created by podman: ```json "Annotations": { "io.containers.manager": "libpod" } ``` Target of this annotaions is to indicate which project in the containers ecosystem is the major manager of a container when applications share the same storage paths. This way projects can decide if they want to manipulate the container or not. For example, since CRI-O and podman are not using the same container library (libpod), CRI-O can skip podman containers and provide the end user more useful information. A corresponding end-to-end test has been adapted as well. Relates to: https://github.com/cri-o/cri-o/pull/2761 Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | Merge pull request #3581 from mheon/no_cgroupsOpenShift Merge Robot2019-09-11
|\ \ | | | | | | Support running containers without CGroups
| * | Add support for launching containers without CGroupsMatthew Heon2019-09-10
| | | | | | | | | | | | | | | | | | | | | This is mostly used with Systemd, which really wants to manage CGroups itself when managing containers via unit file. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #3961 from mheon/copy_volume_contentsOpenShift Merge Robot2019-09-10
|\ \ \ | |_|/ |/| | When first mounting any named volume, copy up
| * | When first mounting any named volume, copy upMatthew Heon2019-09-09
| |/ | | | | | | | | | | | | | | | | | | | | Previously, we only did this for volumes created at the same time as the container. However, this is not correct behavior - Docker does so for all named volumes, even those made with 'podman volume create' and mounted into a container later. Fixes #3945 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3896 from mheon/volume_lookupOpenShift Merge Robot2019-09-09
|\ \ | | | | | | Add ability to look up volumes by unambiguous partial name