summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Make the e2e test network cleanup more robust.Daniel J Walsh2020-09-30
| | | | | | | | | | | | | We need to handle removal of non existing network. This allows the `removeCNINetwork` function always to be called. This is needed by tests which are trying to remove the network manually in order to prevent flakes. Fixes #7809 Signed-off-by: Paul Holzinger <paul.holzinger@web.de> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #7825 from rhatdan/exitcodeOpenShift Merge Robot2020-09-30
|\ | | | | Fix handling of remove of bogus volumes, networks and Pods
| * Fix handling of remove of bogus volumes, networks and PodsDaniel J Walsh2020-09-29
| | | | | | | | | | | | | | | | | | | | | | | | In podman containers rm and podman images rm, the commands exit with error code 1 if the object does not exists. This PR implements similar functionality to volumes, networks, and Pods. Similarly if volumes or Networks are in use by other containers, and return exit code 2. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #7799 from rhatdan/rootlessOpenShift Merge Robot2020-09-30
|\ \ | | | | | | Make all Skips specify a reason
| * | Make all Skips specify a reasonDaniel J Walsh2020-09-29
| | | | | | | | | | | | | | | | | | Always use CGROUPV2 rather then reading from system all the time. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #7832 from edsantiago/bats_run_tzOpenShift Merge Robot2020-09-30
|\ \ \ | |/ / |/| | System tests: add podman run --tz
| * | System tests: add podman run --tzEd Santiago2020-09-29
| |/ | | | | | | | | | | | | | | New tests for podman run --tz=EXPLICIT and =local. Requires updating our testimage by adding a fixed reference timestamp to a known file path. Signed-off-by: Ed Santiago <santiago@redhat.com>
* / System tests: corner case for run --pullEd Santiago2020-09-29
|/ | | | | | | | | | | | | | | | Obscure corner case in which 'podman run --pull=never alpine' will actually pass *with no alpine image* if there's an image named "myalpine". (i.e. a substring match, not full string match). Fixed in #7770 but the tests that were added there do not actually test that. This adds a double-duty test for that as well as making sure that 'run --pull=never SHORTNAME' (implicit :latest) does not match our existing :YYYYMMDD image; then one more quick test to make sure that if we tag as :latest, the same --pull=never succeeds. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #7783 from ashley-cui/slirpOpenShift Merge Robot2020-09-29
|\ | | | | Add support for slirp network for pods
| * Add support for slirp network for podsAshley Cui2020-09-25
| | | | | | | | | | | | flag --network=slirp4netns[options] for root and rootless pods Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #7822 from edsantiago/batsOpenShift Merge Robot2020-09-29
|\ \ | | | | | | Gating-test fix: deal with new crun error msg
| * | Gating-test fix: deal with new crun error msgEd Santiago2020-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crun changed an error message: https://github.com/containers/crun/pull/439 It's a good change, absolutely the right thing to do, but it broke gating tests. Fix tests so they handle both old and new format. Fixes: #7814 Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #7811 from rhatdan/sysctlsOpenShift Merge Robot2020-09-29
|\ \ \ | |/ / |/| | Ignore containers.conf sysctl when namespaces set to host
| * | Ignore containers.conf sysctl when namespaces set to hostDaniel J Walsh2020-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If user sets namespace to host, then default sysctls need to be ignored that are specific to that namespace. --net=host ignore sysctls that begin with net. --ipc=host ignore fs.mqueue --uts=host ignore kernel.domainname and kernel.hostname Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #7803 from edsantiago/batsOpenShift Merge Robot2020-09-29
|\ \ \ | | | | | | | | System tests: reenable some skipped tests
| * | | System tests: reenable some skipped testsEd Santiago2020-09-28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pause test: enable when rootless + cgroups v2 (was previously disabled for all rootless) - run --pull: now works with podman-remote (in #7647, thank you @jwhonce) - various other run/volumes tests: try reenabling It looks like #7195 was fixed (by #7451? I'm not sure if I'm reading the conversation correctly). Anyway, remove all the skip()s on 7195. Only time will tell if it's really fixed) Also: - new test for podman image tree --whatrequires (because TIL). Doesn't work with podman-remote. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #7805 from Luap99/journald-testOpenShift Merge Robot2020-09-28
|\ \ \ | |/ / |/| | Journald log driver test
| * | Journald log driver testPaul Holzinger2020-09-28
| | | | | | | | | | | | | | | | | | | | | Test that the journald log driver writes to journald and that we can read it with journalctl. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | | Merge pull request #7786 from rhatdan/rootlessOpenShift Merge Robot2020-09-28
|\ \ \ | | | | | | | | Remove SkipIfRootless if possible, document other calls
| * | | Remove SkipIfRootless if possible, document other callsDaniel J Walsh2020-09-27
| |/ / | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #7770 from rhatdan/pullpolicyOpenShift Merge Robot2020-09-28
|\ \ \ | | | | | | | | Properly handle podman run --pull command
| * | | Properly handle podman run --pull commandDaniel J Walsh2020-09-27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the --pull missing|always|never is ignored This PR implements this for local API. For remote we need to default to pullpolicy specified in the containers.conf file. Also fixed an issue when images were matching other images names based on prefix, causing images to always be pulled. I had named an image myfedora and when ever I pulled fedora, the system thought that it there were two images named fedora since it was checking for the name fedora as well as the prefix fedora. I changed it to check for fedora and the prefix /fedora, to prefent failures like I had. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Fix network remove for the podman remote clientPaul Holzinger2020-09-28
| | | | | | | | | | | | | | | | | | | | | | | | The podman remote client ignored the force option due a typo. If an error occured the remote client would panic with an index out of range error. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | | Fix podman network rm --force when network is used by a podPaul Holzinger2020-09-28
|/ / | | | | | | | | | | I added a test to prevent a future regression. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #7687 from edsantiago/batsOpenShift Merge Robot2020-09-25
|\ \ | | | | | | system tests: new tests
| * | system tests: new testsEd Santiago2020-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - podman network create: new test - podman pull by-sha + podman images -a (#7651) - podman image mount: new test - podman pod: --infra-image and --infra-command (#7167) For convenience and robustness, build a new testimage containing a custom file /home/podman/testimage-id with contents YYYYMMDD (same as image tag). The image-mount test checks that this file exists and has the desired content. New testimage also includes a dummy 'pause' executable, for testing pod infra. Updates from testimage:20200902 to :20200917 Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Remove some SkipIfRootess flags from testsDaniel J Walsh2020-09-25
| | | | | | | | | | | | | | | | | | | | | We need to get more tests running in rootless mode. Since cgroupsV2 allows management of cgroups in rootless environments a lot of more tests can be run. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #7758 from edsantiago/test_log_driverOpenShift Merge Robot2020-09-24
|\ \ \ | | | | | | | | system tests: new test for run --log-driver
| * | | system tests: new test for run --log-driverEd Santiago2020-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests all (current) values for --log-driver=X, and one test for invalid value. For those drivers that write a local file (json-file, k8s-file), test that the file exists and contains results of the expected form (timestamp, stdout, 'F' for 'F'ull line, and the expected string output. For json-file, confirm that podman issues a "Choosing k8s-file" warning (only on local. On podman-remote, the warning goes only to the server's stderr). Written in response to #7754 in which driver=json-file was falling through to 'none' instead of 'k8s-file'. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #7741 from vrothberg/remote-load-dir-checkOpenShift Merge Robot2020-09-24
|\ \ \ \ | | | | | | | | | | remote load: check if input is directory
| * | | | remote load: check if input is directoryValentin Rothberg2020-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remote client does not support loading directories yet. To prevent confusing error messages and to make the behaviour more explicit, check if the input points to a directory and throw an error if needed. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | | | Merge pull request #7753 from vrothberg/fix-7689OpenShift Merge Robot2020-09-24
|\ \ \ \ \ | |/ / / / |/| | | | remote stats
| * | | | new endpoint: /libpod/containers/statsValentin Rothberg2020-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new endpoint for container stats allowing for batch operations on more than one container. The new endpoint deprecates the single-container endpoint which will eventually be removed with the next major release. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | | | Merge pull request #7763 from edsantiago/bats_better_parse_tableOpenShift Merge Robot2020-09-24
|\ \ \ \ \ | | | | | | | | | | | | system tests: helpers: safer parse_table
| * | | | | system tests: helpers: safer parse_tableEd Santiago2020-09-23
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parse_table() helper has until now dumbly split lines on every single '|' character. This prevents us from running simple tests such as 'cgroupManager: (systemd|cgroupfs)'. We now use an ugly but robust sed expression to split on '|' but *only* when surrounded by spaces and/or beginning or end of line. This is safe because, for readability, all tables already keep the '|' symbols well separated from table content. Add tests. And, the whole reason behind this, add an actual real test for cgroupManager and cgroupVersion. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | Merge pull request #7739 from zhangguanzhang/apiv2-containers-limitOpenShift Merge Robot2020-09-24
|\ \ \ \ \ | | | | | | | | | | | | apiv2 /containers/json limit differ from docker-api
| * | | | | apiv2 container limit differ from docker-apizhangguanzhang2020-09-24
| | |/ / / | |/| | | | | | | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | | | | Merge pull request #7759 from xordspar0/app-filterOpenShift Merge Robot2020-09-24
|\ \ \ \ \ | | | | | | | | | | | | Allow filtering on pod label values
| * | | | | Allow filtering on pod label valuesJordan Christiansen2020-09-23
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, filters of the form `podman pod ps --filter label=app=myapp` were not working. The results would include all pods that contained the app label with any value. Looking at the code, this makes sense. It appears that the second = and everything after it were getting truncated. Even though there was already a passing test that tested `podman pod ps --filter label=io.podman.test.label=value1`, the test failed with the above example with a label `app=myapp`. The new code works in both cases. Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
* / | | | Remove final v2remotefail failuresDaniel J Walsh2020-09-23
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most have been fixed, others I replaced with SkipIfRemote Fix ContainerStart on tunnel, it needs to wait for the exit status before returning. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #7745 from rhatdan/systemdOpenShift Merge Robot2020-09-23
|\ \ \ \ | | | | | | | | | | Systemd should be able to run as rootless
| * | | | Systemd should be able to run as rootlessDaniel J Walsh2020-09-23
| |/ / / | | | | | | | | | | | | | | | | | | | | Turn on most of the systemd tests for rootless. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | e2e tests: SkipIfRemote(): add a reasonEd Santiago2020-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that Dan has added helpful comments to each SkipIfRemote, let's take the next step and include those messages in the Skip() output so someone viewing test results can easily see if a remote test is skipped for a real reason or for a FIXME. This commit is the result of a simple: perl -pi -e 's;(SkipIfRemote)\(\)(\s+//\s+(.*))?;$1("$3");' *.go in the test/e2e directory, with a few minor (manual) changes in wording. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #7727 from rhatdan/attachOpenShift Merge Robot2020-09-23
|\ \ \ \ | |/ / / |/| | | Examine all SkipIfRemote functions
| * | | Examine all SkipIfRemote functionsDaniel J Walsh2020-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove ones that are not needed. Document those that should be there. Document those that should be fixed. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #7729 from mheon/info_cgroup_managerOpenShift Merge Robot2020-09-22
|\ \ \ \ | |/ / / |/| | | Include cgroup manager in `podman info` output
| * | | Include cgroup manager in `podman info` outputMatthew Heon2020-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is very useful for debugging cgroups v2, especially on rootless - we need to ensure people are correctly using systemd cgroups in these cases. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | Merge pull request #7719 from vrothberg/fix-multi-image-saveOpenShift Merge Robot2020-09-22
|\ \ \ \ | |/ / / |/| | | podman save: fix redirect of multi-images
| * | | podman save: fix redirect of multi-imagesValentin Rothberg2020-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug when saving multi-image archives where the progress bars from copying images was accidentally written to the archive and hence corrupted it. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | | Merge pull request #7717 from rhatdan/attachOpenShift Merge Robot2020-09-22
|\ \ \ \ | | | | | | | | | | Fix up attach tests for podman remote