Commit graph

14 commits

Author SHA1 Message Date
Ed Santiago a17fb01d40 BATS: add ping test
- run test : tweaks to recently-added network-conflict test:
   * remove "-d" in run
   * confirm exact warning text, and also that container
     runs successfully
   * test multiple --net options (regression #8057)

 - images, run, build, exec tests: add multiple-flag
   testing for various flags, confirming as appropriate
   whether options are overridden or accumulated.

 - ps test : add --filter and --sort tests

 - pod test: run 'ping' inside container (confirms that
   container gets PING capability)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-01 08:14:54 -07:00
Daniel J Walsh 916825b675
Pod's that share the IPC Namespace need to share /dev/shm
Containers that share IPC Namespaces share each others
/dev/shm, which means a private /dev/shm needs to be setup
for the infra container.

Added a system test and an e2e test to make sure the
/dev/shm is shared.

Fixes: https://github.com/containers/podman/issues/8181

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-30 05:21:34 -04:00
Ed Santiago 1646da834c System test additions
- run --userns=keep-id: confirm that $HOME gets set (#8013)

 - inspect: confirm that JSON output is a sane number of
   lines (10 or more), not an unreadable one-liner (#8011
   and #8021). Do so with image, pod, network, volume
   because the code paths might be different.

 - cgroups: confirm that 'run' preserves cgroup manager (#7970)

 - sdnotify: reenable tests, and hope CI doesn't hang. This
   test was disabled on August 18 because CI jobs were hanging
   and timing out. My suspicion was that it was #7316, which
   in turn seems to have hinged on conmon #182. The latter
   was merged on Sep 16, so let's cross our fingers and see
   what happens.

Also: remove inaccurate warning from a networking test.

And, wow, fix is_cgroupsv2(), it has never actually worked.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-14 15:32:02 -06:00
Ed Santiago bd3c66fc81 system tests: new tests
- 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>
2020-09-19 15:55:00 -06:00
Ed Santiago d254fa4c35 system tests: enable more remote tests; cleanup
info, images, run, networking tests: remove some skip_if_remote()s
that were added in the varlink days. All of these tests now seem
to work with APIv2.

help test: check that first output line from 'podman --help'
is the program description (regression check for #7273).

load test: clean up stray images, rewrite test to make it conform
to existing convention. In the process, discover and file #7337

exec test (and networking): file #7360, and add FIXME comment
to skip()s suggesting evaluating those tests once that is fixed.

pod test: now that #6328 is fixed, use 'podman pod inspect --format'
instead of relying on jq

Various other tests: add an explanation of why test is disabled
so we can more easily distinguish "this will never be meaningful
under remote" vs "hey, doesn't work for now, but maybe someday".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-19 08:12:14 -06:00
Daniel J Walsh a0fb081003
Handle podman-remote run --rm
We need to remove the container after it has exited for
podman-remote run --rm commands.  If we don't remove this
container at this step, we open ourselves up to race conditions.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-04 20:26:34 -04:00
Ed Santiago a4fcf09b7a Reenable remote system tests
podman-remote is in better shape now. Let's see what needs
to be done to reenable remote system tests.

 - logs test: skip multilog, it doesn't work remote

 - diff test: use -l only when local, not with remote

 - many other tests: skip_if_remote, with 'FIXME: pending #xxxx'
   where xxxx is a filed issue.

Unrelated: added new helper to skip_if_remote and _if_rootless,
where we check if the source message includes "remote"/"rootless"
and insert it if missing. This is a minor usability enhancement
to make it easier to understand at-a-glance why a skip triggers.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-03 09:36:36 -06:00
Brent Baude c58127602e Error on rootless mac and ip addresses
When creating a pod or container where a static MAC or IP address is provided, we should return a proper error and exit as 125.

Fixes: #6972

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-07-15 07:06:58 -05:00
Ed Santiago f4643ac02a system tests: add pod, inspect testing
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>
2020-06-26 06:44:20 -06:00
Ed Santiago 2d5a2a7640 BATS and APIv2: more tests and tweaks
- (minor): apiv2 tests: check for full ID

   Observation made while reviewing #6461: tests were checking
   only for a 12-character container/image ID in return value.
   It's actually 64, and we should test for that. This should
   also minimize confusion in a future maintainer.

 - podman pause/unpause: new test

   Runs a 'date/sleep' loop, pauses container, sleeps 3s,
   restarts, then confirms that there's a 3- to 6-second
   gap in the logs for the container.

 - podman healthcheck: new test

   run a container with healthcheck, test both healthy
   and unhealthy conditions

 - podman pod: check '{{.Pod}}' field in podman ps

   Hey, as long as we have a pod with two running
   containers, might as well confirm that 'podman ps'
   returns the expected pod ID.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-06-03 16:13:33 -06:00
Ed Santiago 03d32d05ac system tests : more tests
- exec: add test for #5046, in which conmon swallowed chars
  on a large byte transfer

- pod: add 'pod exists' tests, both positive and negative;
  consolidate tests; add '--label', and check in 'pod inspect'
  add 'pod ps' tests

- networking: add test for #5466, in which detached run
  with --userns=keep-id would not forward a port

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-06-01 12:00:47 -06:00
Boaz Shuster 1f8a78747a Add --format to pod inspect
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2020-05-27 09:48:38 +03:00
Sujil02 9f5e661cfe Enables iidfile test as issue fixed now
Signed-off-by: Sujil02 <sushah@redhat.com>
2020-05-21 18:37:31 -04:00
Ed Santiago a4bfcd75aa system tests: more podman-pod tests
* rename pod-top.bats to pod.bats
* add test for TCP port communication between pods
* add test for various podman-pod-create options

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-20 11:04:54 -06:00