summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #6693 from goochjj/libpod-sd-notify-cmdlineOpenShift Merge Robot2020-07-06
|\ | | | | Implement --sdnotify cmdline option to control sd-notify behavior
| * BATS system tests for new sdnotifyEd Santiago2020-07-06
| | | | | | | | Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #6570 from rhatdan/remoteOpenShift Merge Robot2020-07-06
|\ \ | | | | | | Change buildtag for remoteclient to remote for testing
| * | Change buildtag for remoteclient to remote for testingDaniel J Walsh2020-07-06
| | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #6868 from mheon/fix_mount_rootlessOpenShift Merge Robot2020-07-06
|\ \ \ | |/ / |/| | Fix bug where `podman mount` didn't error as rootless
| * | Disable mount tests as rootlessMatthew Heon2020-07-06
| | | | | | | | | | | | | | | | | | | | | | | | As rootless, `podman mount` must be run inside `podman unshare`. We don't really have a testing harness that can do this right now. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #6812 from chuanchang/add_apiv2_testOpenShift Merge Robot2020-07-06
|\ \ \ | |_|/ |/| | test.apiv2: add testing for container initializing
| * | test.apiv2: add testing for container initializingAlex Jia2020-07-01
| | | | | | | | | | | | Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
* | | Merge pull request #6836 from ashley-cui/tzlibpodOpenShift Merge Robot2020-07-06
|\ \ \ | |_|/ |/| | Add --tz flag to create, run
| * | Add --tz flag to create, runAshley Cui2020-07-02
| |/ | | | | | | | | | | | | --tz flag sets timezone inside container Can be set to IANA timezone as well as `local` to match host machine Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #6864 from vrothberg/v2-moduleOpenShift Merge Robot2020-07-06
|\ \ | | | | | | move go module to v2
| * | move go module to v2Valentin Rothberg2020-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | podman ps truncate the commandPaul Holzinger2020-07-05
|/ / | | | | | | | | | | | | | | | | With a long create command the output from ps is basically unreadable. This is a regression that was introduced with Podman 2.0. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* / stop podman service in e2e testsBrent Baude2020-07-02
|/ | | | | | when running e2e tests, each test knows to stop its service when running remote; however, during setup and teardown remote services were not being killed when we were done with them. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #6826 from edsantiago/test_apiv2OpenShift Merge Robot2020-06-30
|\ | | | | APIv2 tests: usability: better test logging
| * APIv2 tests: usability: better test loggingEd Santiago2020-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test-apiv2 has two basic comparisons of returned JSON: equality and likeness ('=' and '~'). When logging failures, the test runner shows both actual and expected values. When logging success, for '=' there's no need to show both actual and expected. But for '~', it can be helpful (for verifying test correctness) to show the actual returned value. To be specific: old: ok ... .MemTotal~[0-9]\+ new: ok ... .MemTotal ('33509068800') ~ [0-9]\+ old: ok ... .[0].State~\(exited\|stopped\) new: ok ... .[0].State ('exited') ~ \(exited\|stopped\) The main benefit is that a developer or end user can easily see precisely what was returned; this can help confirm that the test is working as intended, and/or help fine-tune how the test is written. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #6747 from giuseppe/fix-user-volumesOpenShift Merge Robot2020-06-30
|\ \ | |/ |/| container: move volume chown after spec generation
| * test: add tests for --user and volumesValentin Rothberg2020-06-29
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #6808 from mheon/allow_empty_hostportOpenShift Merge Robot2020-06-29
|\ \ | | | | | | Allow empty host port in --publish flag
| * | Allow empty host port in --publish flagMatthew Heon2020-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't believe that this was actually legal, but it looks like it is. And, unlike our previous understanding (host port being empty means just use container port), empty host port actually carries the same meaning as `--expose` + `--publish-all` (that is, assign a random host port to the given container port). This requires a significant rework of our port handling code to handle this new case. I don't foresee this being commonly used, so I optimized having a fixed port number as fast path, which this random assignment code running after the main port handling code only if necessary. Fixes #6806 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #6810 from vrothberg/auto-update-testOpenShift Merge Robot2020-06-29
|\ \ \ | | | | | | | | systemd system test: run auto-update
| * | | systemd system test: run auto-updateValentin Rothberg2020-06-29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run `podman auto-update` in the systemd system tests. Note that this is a first step to at least exercise parts of `auto-update` in the CI. The service won't get updated just yet as we need to set up a local registry, and push a new image. I do not have enough time at the moment to do that but consider this change already as an improvement. We are experiencing some issues in #6793 w.r.t. to auto-updates but couldn't track down the root cause yet. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #6783 from edsantiago/batsOpenShift Merge Robot2020-06-29
|\ \ \ | |/ / |/| | system tests: add pod, inspect testing
| * | system tests: add pod, inspect testingEd Santiago2020-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <santiago@redhat.com>
* | | Merge pull request #6767 from vrothberg/sec-opt-testOpenShift Merge Robot2020-06-26
|\ \ \ | | | | | | | | e2e inspect: HostConfig.SecurityOpt
| * | | e2e inspect: HostConfig.SecurityOptValentin Rothberg2020-06-25
| | |/ | |/| | | | | | | | | | | | | | | | Make sure that all specified security options are displayed in a container's inspect data. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #6756 from mheon/add_dangling_filterOpenShift Merge Robot2020-06-26
|\ \ \ | |_|/ |/| | Add support for dangling filter to volumes
| * | Add support for dangling filter to volumesMatthew Heon2020-06-24
| |/ | | | | | | | | | | | | | | | | The dangling filter determine whether a volume is dangling - IE, it has no containers attached using it. Unlike our other filters, this one is a boolean - must be true or false, not arbitrary values. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #6761 from mheon/fix_ps_portmappingsOpenShift Merge Robot2020-06-25
|\ \ | | | | | | Print port mappings in `ps` for ctrs sharing network
| * | Print port mappings in `ps` for ctrs sharing networkMatthew Heon2020-06-24
| |/ | | | | | | | | | | | | | | | | In Podman v1.9, we printed port mappings for the container, even if it shared its network namespace (and thus ports) with another container. We regressed on this in Podman v2.0, which is fixed here. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #6760 from jwhonce/wip/pythonOpenShift Merge Robot2020-06-25
|\ \ | | | | | | Fix podman python docker-py tests
| * | Fix python dockerpy testsJhon Honce2020-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor packaging so unittest discovery works * Refactor tests to use python3-docker.rpm that ships with Fedora32 * Flush image cache between tests suites * Update documentation to reflect changes Outstanding issue: * client.get_image() does not fail if image does not exist Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #6754 from edsantiago/man_page_xrefOpenShift Merge Robot2020-06-25
|\ \ \ | | | | | | | | Docs: consistency between man / --help
| * | | Docs: consistency between man / --helpEd Santiago2020-06-24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functionality in hack/man-page-checker: start cross- referencing the man page 'Synopsis' line against the output of 'podman foo --help'. This is part 1, flag/option consistency. Part 2 (arg consistency) is too big and will have to wait for later. flag/option consistency means: if 'podman foo --help' includes the string '[flags]' in the Usage message, make sure the man page includes '[*options*]' in its Synopsis line, and vice-versa. This found several inconsistencies, which I've fixed. While doing this I realized that Cobra automatically includes a 'Flags:' subsection in its --help output for all subcommands that have defined flags. This is great - it lets us cross-check against the usage synopsis, and make sure that '[flags]' is present or absent as needed, without fear of human screwups. If a flag-less subcommand ever gets extended with flags, but the developer forgets to add '[flags]' and remove DisableFlagsInUseLine, we now have a test that will catch that. (This, too, caught two instances which I fixed). I don't actually know if the new man-page-checker functionality will work in CI: I vaguely recall that it might run before 'make podman' does; and also vaguely recall that some steps were taken to remedy that. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #6751 from vrothberg/fix-6744OpenShift Merge Robot2020-06-25
|\ \ \ | |_|/ |/| | podman run/create: support all transports
| * | Friendly amendment for pr 6751Ed Santiago2020-06-24
| | | | | | | | | | | | | | | | | | More robust system test for podman run/create docker-archive Signed-off-by: Ed Santiago <santiago@redhat.com>
| * | podman run/create: support all transportsValentin Rothberg2020-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Support all image transports in podman run/create. It seems we regressed with v2 on that. Also add tests to make sure we're not regressing again. Fixes: #6744 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #6732 from mheon/fix_stopsignal_setOpenShift Merge Robot2020-06-24
|\ \ \ | |_|/ |/| | Set stop signal to 15 when not explicitly set
| * | Set stop signal to 15 when not explicitly setMatthew Heon2020-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When going through the output of `podman inspect` to try and identify another issue, I noticed that Podman 2.0 was setting StopSignal to 0 on containers by default. After chasing it through the command line and SpecGen, I determined that we were actually not setting a default in Libpod, which is strange because I swear we used to do that. I re-added the disappeared default and now all is well again. Also, while I was looking for the bug in SpecGen, I found a bunch of TODOs that have already been done. Eliminate the comments for these. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #6746 from vrothberg/untagOpenShift Merge Robot2020-06-24
|\ \ \ | |_|/ |/| | podman untag: error if tag doesn't exist
| * | podman untag: error if tag doesn't existValentin Rothberg2020-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Throw an error if a specified tag does not exist. Also make sure that the user input is normalized as we already do for `podman tag`. To prevent regressions, add a set of end-to-end and systemd tests. Last but not least, update the docs and add bash completions. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #6729 from QiWang19/inspect-formatOpenShift Merge Robot2020-06-24
|\ \ \ | | | | | | | | Reformat inspect network settings
| * | | Reformat inspect network settingsQi Wang2020-06-23
| |/ / | | | | | | | | | | | | | | | Reformat ports of inspect network settings to compatible with docker inspect. Close #5380 Signed-off-by: Qi Wang <qiwan@redhat.com>
* | | Merge pull request #6733 from edsantiago/bats_help_extra_argsOpenShift Merge Robot2020-06-24
|\ \ \ | | | | | | | | BATS tests: new too-many-arguments test
| * | | BATS tests: new too-many-arguments testEd Santiago2020-06-23
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...plus a few others. And fixes to actual parsing. If a command's usage message includes '...' in the argument list, assume it can take unlimited arguments. Nothing we can check. For all others, though, the ALL-CAPS part on the right-hand side of the usage message will define an upper bound on the number of arguments accepted by the command. So in our 'podman --help' test, generate N+1 args and run that command. We expect a 125 exit status and a suitably helpful error message. Not all podman commands or subcommands were checking, so I fixed that. And, fixed some broken usage messages (all-caps FLAGS, and '[flags]' at the end of 'ARGS'). Add new checks to the help test to prevent those in the future. Plus a little refactoring/cleanup where necessary. Signed-off-by: Ed Santiago <santiago@redhat.com>
* / / libpod: specify mappings to the storageGiuseppe Scrivano2020-06-24
|/ / | | | | | | | | | | | | | | | | | | | | | | specify the mappings in the container configuration to the storage when creating the container so that the correct mappings can be configured. Regression introduced with Podman 2.0. Closes: https://github.com/containers/libpod/issues/6735 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #6728 from mheon/add_privileged_testsOpenShift Merge Robot2020-06-23
|\ \ | | | | | | Add tests for --privileged with other flags
| * | Add tests for --privileged with other flagsMatthew Heon2020-06-23
| |/ | | | | | | | | | | | | | | With Podman v2.0, we broke (or thought we were going to break) using `--privileged` with `--group-add` and `--security-opt` (specifically using `--security-opt` for SELinux config). Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #6726 from edsantiago/batsOpenShift Merge Robot2020-06-23
|\ \ | |/ |/| system tests: invoke with abs path to podman
| * system tests: invoke with abs path to podmanEd Santiago2020-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reversion of one part of #6679: my handling of 'realpath' would not work when $PODMAN is 'podman-remote --url etc'. Trying to handle that case got unmaintainable; so instead let's just force 'make {local,remote}system' to invoke with a full PODMAN path. This breaks down if someone runs the tests with a manual 'bats' invocation, but I think I'm the only one who ever does that. Since podman path will now be very long in the logs, add code to logformatter to abbreviate it like we do for the ginkgo logs. And, one thing that has bugged me for a long time: in the error logs, show a different prompt ('#' vs '$') to distinguish root vs rootless. This should make it much easier to see at-a-glance whether a log file is root or not. Add tests for it. Signed-off-by: Ed Santiago <santiago@redhat.com>