summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* 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>
* | Merge pull request #6722 from vrothberg/fix-6718OpenShift Merge Robot2020-06-23
|\ \ | |/ |/| image load: no args required
| * image load: no args requiredValentin Rothberg2020-06-23
| | | | | | | | | | | | | | | | | | Disable the args requirement of `image load`. Instead of requiring a lower bound, we really need an upper one with at most 1 argument. Extend the system tests to prevent future regressions. Fixes: #6718 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #6679 from edsantiago/batsOpenShift Merge Robot2020-06-23
|\ \ | | | | | | system tests: new rm, build tests
| * | system tests: new rm, build testsEd Santiago2020-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rm: confirm 'rm' and 'rm -f' on running container - build: shotgun test of workdir, cmd, env, labels The new build test cd's to a temporary directory, which broke test invocations using a relative path (./bin/podman). Added code to detect relative paths and convert them to absolute. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #6710 from vrothberg/fix-6413OpenShift Merge Robot2020-06-23
|\ \ \ | |_|/ |/| | libpod/containers/json: alias last -> limit
| * | libpod/containers/json: alias last -> limitValentin Rothberg2020-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support both `last` and `limit` for in the containers listing endpoint. We intended to use `limit` which is also mentioned in the docs, but the implementation ended up using `last` as the http parameter; likely being caused by the CLI using `--last`. To avoid any regression, we decided for supporting both and aliasing `last`. Fixes: #6413 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #6625 from QiWang19/fdOpenShift Merge Robot2020-06-23
|\ \ \ | |_|/ |/| | Add --preservefds to podman run
| * | Add --preservefds to podman runQi Wang2020-06-19
| | | | | | | | | | | | | | | | | | Add --preservefds to podman run. close https://github.com/containers/libpod/issues/6458 Signed-off-by: Qi Wang <qiwan@redhat.com>
* | | Merge pull request #6702 from jgallucci32/follow-logs-pollOpenShift Merge Robot2020-06-22
|\ \ \ | |_|/ |/| | Stop following logs using timers
| * | Add explicit command to alpine container in test case.jgallucci322020-06-22
| | | | | | | | | | | | Signed-off-by: jgallucci32 <john.gallucci.iv@gmail.com>
| * | Stop following logs using timersjgallucci322020-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This incorporates code from PR #6591 and #6614 but does not use event channels to detect container state and rather uses timers with a defined wait duration before calling t.StopAtEOF() to ensure the last log entry is output before a container exits. The polling interval is set to 250 milliseconds based on polling interval defined in hpcloud/tail here: https://github.com/hpcloud/tail/blob/v1.0.0/watch/polling.go#L117 Co-authored-by: Qi Wang <qiwan@redhat.com> Signed-off-by: jgallucci32 <john.gallucci.iv@gmail.com>
* | | Merge pull request #6683 from rhatdan/hostnameOpenShift Merge Robot2020-06-21
|\ \ \ | | | | | | | | Add container name to the /etc/hosts within the container
| * | | Add container name to the /etc/hosts within the containerDaniel J Walsh2020-06-20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow containers that connect to the network namespace be able to use the container name directly. For example you can do something like podman run -ti --name foobar fedora ping foobar While we can do this with hostname now, this seems more natural. Also if another container connects on the network to this container it can do podman run --network container:foobar fedora ping foobar And connect to the original container,without having to discover the name. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #6671 from rhatdan/buildOpenShift Merge Robot2020-06-21
|\ \ \ | |/ / |/| | Fix podman build handling of --http-proxy flag
| * | Fix podman build handling of --http-proxy flagDaniel J Walsh2020-06-19
| |/ | | | | | | | | | | Also fixed a todo for handling of cgroup manager while I was in there. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #6621 from vrothberg/bz-1846629OpenShift Merge Robot2020-06-20
|\ \ | | | | | | search: allow wildcards
| * | search: allow wildcardsValentin Rothberg2020-06-19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow wildcards in the search term. Note that not all registries support wildcards and it may only work with v1 registries. Note that searching implies figuring out if the specified search term includes a registry. If there's not registry detected, the search term will be used against all configured "unqualified-serach-registries" in the registries.conf. The parsing logic considers a registry to be the substring before the first slash `/`. With these changes we now not only support wildcards but arbitrary input; ultimately it's up to the registries to decide whether they support given input or not. Fixes: bugzilla.redhat.com/show_bug.cgi?id=1846629 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #6675 from yhchen0906/masterOpenShift Merge Robot2020-06-20
|\ \ | | | | | | correct the absolute path of `rm` executable
| * | correct the absolute path of `rm` executableYuan-Hao Chen2020-06-19
| |/ | | | | | | Signed-off-by: Yuan-Hao Chen <yhchen0906@gmail.com>
* / Fixes #6670Jhon Honce2020-06-19
|/ | | | | | | * Sort images for -q option, removing duplicate id's * Sort images for --format json Signed-off-by: Jhon Honce <jhonce@redhat.com>
* CI: force registry:2.6Valentin Rothberg2020-06-19
| | | | | | | | | | | For using the `registry:2.6` image. 2.7 and beyond dropped the `htpasswd` binary from the rootfs which parts of our CI depends on. While this is not a sustainable solution (assuming `htpasswd` is gone for ever), it unblocks the CI for now. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* unflake rmi testsValentin Rothberg2020-06-18
| | | | | | | Make sure to always get the older images that previously committed one depends on. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #6654 from rhatdan/keepidOpenShift Merge Robot2020-06-17
|\ | | | | Don't ignore --user flag in rootless --userns keepid
| * Don't ignore --user flag in rootless --userns keepidDaniel J Walsh2020-06-17
| | | | | | | | | | | | | | | | Currently podman run --userns keep-id --user root:root fedora id The --user flag is ignored. Removing this makes the code work correctly. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Handle dropping capabilties correctly when running as non root userDaniel J Walsh2020-06-17
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #6560 from mheon/fix_exec_logdriverOpenShift Merge Robot2020-06-17
|\ \ | |/ |/| Do not share container log driver for exec
| * Do not share container log driver for execMatthew Heon2020-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the container uses journald logging, we don't want to automatically use the same driver for its exec sessions. If we do we will pollute the journal (particularly in the case of healthchecks) with large amounts of undesired logs. Instead, force exec sessions logs to file for now; we can add a log-driver flag later (we'll probably want to add a `podman logs` command that reads exec session logs at the same time). As part of this, add support for the new 'none' logs driver in Conmon. It will be the default log driver for exec sessions, and can be optionally selected for containers. Great thanks to Joe Gooch (mrwizard@dok.org) for adding support to Conmon for a null log driver, and wiring it in here. Fixes #6555 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #6522 from mheon/unless-stoppedOpenShift Merge Robot2020-06-17
|\ \ | | | | | | Add support for the unless-stopped restart policy