Commit graph

22 commits

Author SHA1 Message Date
baude f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
baude bc7b1ca03d enable integration tests for remote-client
first pass at enabling a swath of integration tests for the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 14:06:02 -05:00
Giuseppe Scrivano 4ac08d3aa1
ps: fix segfault if the store is not initialized
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-19 15:01:54 +01:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
Kunal Kushwaha d47d976c0b testcase added for listing range of ports in ps command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-15 15:50:11 +09:00
baude d5546008ab ginkgo status improvements
a series of improvements to our ginkgo test framework so we can
get better ideas of whats going on when run in CI

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 13:28:33 -06:00
Daniel J Walsh 4c618875f6
Add tests to make sure podman container and podman image commands work
We have little to no testing to make sure we don't break podman image and
podman container commands that wrap traditional commands.

This PR adds tests for each of the commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-02 07:15:26 -05:00
baude ca53122338 Fix regression in ps with custom format
Using the table keyword in go templating had regressed and was
no longer working.

Fixes: 2221

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:32:28 -06:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
Matthew Heon 2bc6427302 Fix handling of multiple filters in podman ps
Docker expects multiple filters to be passed with multiple uses
of the --filter flag (e.g. --filter=label=a=b --filter=label=c=d)
and not a single comma-separated list of filters as we expected.
Convert to the Docker format, and make some small cleanups to our
handling of filters along the way.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1345
Approved by: umohnani8
2018-08-27 14:47:41 +00:00
haircommander d5e690914d Added option to share kernel namespaces in libpod and podman
A pause container is added to the pod if the user opts in. The default pause image and command can be overridden. Pause containers are ignored in ps unless the -a option is present. Pod inspect and pod ps show shared namespaces and pause container. A pause container can't be removed with podman rm, and a pod can be removed if it only has a pause container.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 26b9b17d27 Added ps --pod option
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1205
Approved by: rhatdan
2018-08-02 20:39:06 +00:00
baude 5a4e5902a0 Integration Test Improvements #2
This is the second round of performance improvements for out
integration tests.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1190
Approved by: rhatdan
2018-07-30 23:53:08 +00:00
baude 433cbd5254 Show duration for each ginkgo test and test speed improvements
Because our tests are getting so long, we want to be able to audit which tests are taking
the longest to complete.  This may indicate a bad test, bad CI, bad code, etc and therefore
should be auditable.

Also, make speed improvements to tests by making sure we only unpack caches images that
actually get used.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1178
Approved by: mheon
2018-07-28 22:51:08 +00:00
Matthew Heon 2bdefc6c1e Fix ps --sort=size test
I don't know how the previous test was succeeding, as we never
actually fetched the sizes to sort with. The test now does.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-07-13 15:14:51 -04:00
haircommander 4ab054073d Added --sort to ps
Also podman ps now allows user to only output size of root FS, changed language of images and ps --sort to be by "created" as opposed to "time", and refactored the way templates are created (converted from psJSONParams type).

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #948
Approved by: rhatdan
2018-06-19 14:45:29 +00:00
Matthew Heon c1ef1151ac Temporarily turn of ps --last test until fixed
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #944
Approved by: rhatdan
2018-06-14 19:03:52 +00:00
baude ff091cf731 sleep does not catch SIGTERM
As Matt pointed out, when running sleep in a container, the clean up was taking a
full ten seconds to stop container because sleep does not catch SIGTERM which is
the default podman stop signal and it had to wait for SIGKILL.  Changing sleep to
top should result in better test times.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #492
Approved by: rhatdan
2018-03-14 20:38:08 +00:00
umohnani8 363cfcb0ce Fix when the --format flag prints a new line at the end
If the output is to a terminal, return a new line at the end of the
output so that the output is visually appealing. If the output is being
piped, or saved to a file, basically not being outputted to a terminal, do
not print a new line at the end of the output. This ensures any further data
manipulation with the results happens smoothly without requiring to remember
the '/n' at the end of the output.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2018-02-07 10:43:16 -05:00
baude 0387f69d39 Migrate kill tests to ginkgo
Migrate kill tests to the ginkgo suite and remove the
podman_kill bats.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #281
Approved by: baude
2018-02-01 19:04:00 +00:00
baude 3c044f9267 Ginkgo Tests: ps, pull, push and rm
Migrate ps, pull, push, and rm from bats to ginkgo.

Also, fixed a conditional issue with adding ports
when an image defines the port and the user wants
to override it.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #277
Approved by: baude
2018-01-31 20:23:31 +00:00