Commit graph

41 commits

Author SHA1 Message Date
Qi Wang 66798e993a Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263
Add --list-tags to podman search to return a table the repository tags.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-09 11:49:46 -04:00
Jhon Honce b490905f26 Port commands to V2 --format 'table...'
* 'containers mount'
 * 'image history'
 * 'images mount'
 * 'images search'
 * Correct spelling errors

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-07 10:40:30 -07:00
Daniel J Walsh ccc5bc167f
Attempt to turn on some more remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-07 10:19:08 -04:00
Daniel J Walsh b496802413
Make all Skips specify a reason
Always use CGROUPV2 rather then reading from system all the time.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 16:01:26 -04:00
Ed Santiago b7147afde9 e2e tests: SkipIfRemote(): add a reason
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>
2020-09-23 08:09:31 -06:00
Daniel J Walsh a277b7eb0b
Examine all SkipIfRemote functions
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>
2020-09-22 16:55:37 -04:00
Sascha Grunert fef3e2da6a
Remove some unnecessary []byte to string conversions
Some calls to `Sprintf("%s")` can be avoided by using direct string
type assertions.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-03 09:13:04 +02:00
Ralf Haferkamp ad2efbe9e1 Add test case for description being present in search result
Test for a specific static image and match the description to avoid
regression like https://github.com/containers/podman/pull/7131

Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
2020-07-31 15:39:57 +02:00
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Daniel J Walsh 65e1638f9b
Enable a bunch of remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 19:23:24 -04:00
Daniel J Walsh a10d5b42ab
Change buildtag for remoteclient to remote for testing
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 15:22:24 -04:00
Valentin Rothberg 8489dc4345 move go module to v2
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>
2020-07-06 15:50:12 +02:00
Valentin Rothberg b05888a97d search: allow wildcards
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>
2020-06-19 14:47:36 +02:00
Valentin Rothberg 5ee3af2d03 enable search tests
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-29 16:28:18 +02:00
Brent Baude 5c968b7693 Force integration tests to pass
Failing tests are now skipped and we should work from this.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 13:48:50 -05:00
Jhon Honce 651ddd3560 Reduce CPU usage when --timeout=0
* Add second go routine for when a Timer is not needed.
* goimports updated some project files

Fixes #5531

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-18 10:27:25 -07:00
Brent Baude 04f1306c87 curb flakes in integration tests
instead of searching the fedora registry which is error prone, we instead search a local registry for the empty set search.

when running two containers with the same IP, i suspect the first container has not fully gotten its ip information back from cni when the second container fires.  rework this test such that we use nginx to make sure the container is up and running before continues which should pace the subsequent test.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-26 08:30:28 -06:00
Ed Santiago bb31d35d99 search test on fedora registry: retry 5 times
...to try to compensate for flaky host.

registry.fedoraproject.org is just not reliable. It's flaking
with 503 errors, causing massive amounts of wasted CI time
and developer effort.

There is exactly one instance of that registry in these tests.
We can't replace it with quay.io, because "search quay.io/"
(trailing slash) fails with some sort of authentication error.
So let's just try a sleep/retry cycle instead.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-02-20 13:13:29 -07:00
Qi Wang d7c0f968ca fix bug check nonexist authfile
Use GetDefaultAuthFile() from buildah.
For podman command(except login), if authfile does not exist returns error.

close #4328

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-05 21:32:18 -05:00
Qi Wang 619a39f7bb fix search output limit
close https://bugzilla.redhat.com/show_bug.cgi?id=1732280
From the bug Podman search returns 25 results even when limit option `--limit` is larger than 25(maxQueries). They want Podman to return `--limit` results.

This PR fixes the number of output result.
if --limit not set, return MIN(maxQueries, len(res))
if --limit is set, return MIN(option, len(res))

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-01 16:15:15 -04:00
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 3c0147e559 podman-remote start
enable the ability to start containers from the remote-client.  also,
enable start integration tests for remote testing.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-17 11:08:54 -05:00
Jhon Honce 09ff62429a Implement podman-remote rm
* refactor command output to use one function
* Add new worker pool parallel operations
* Implement podman-remote umount
* Refactored podman wait to use printCmdOutput()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-09 11:55:26 -07: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
Chris Evich 038364c6e3
Fix down/missing registry.access.redhat.com
This registry responds differently depending on the the platform
accessing it.  It also occasionally goes down or returns 404s.  Improve
the reliability of the e2e tests by using the registry/image used
for gating pull-requests.

This way, if there's a registry/networking problem, the gating test
will fail and prevent anything else from running.  This is a better
failure to have early, rather than wait and need to re-run all the
e2e tests again later.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-07 09:50:45 -05: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
baude 0360ec725a allow ppc64le to pass libpod integration tests
this pr allows the libpod integration suite to pass on the
ppc64le architecture.  in some cases, I had to skip tests.
eventually, these tests need to be fixed so that they properly pass. of
note for this PR is:

* changed the ppc64le default container os to be overlay (over vfs) as vfs seems non-performant on ppc64le
* still run vfs for rootless operations
* some images names for ppc64le had to change because they don't exist.
* this should help getting our CI to run on the platform

Signed-off-by: baude <bbaude@redhat.com>
2018-10-31 18:40:09 -05:00
Daniel J Walsh f60fe5fb2f
Vendor in the latest containers/storage, image and buildah
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-29 08:01:25 +02:00
baude 0c0de6dcc5 change search test to look for fedora and not fedora-minimal
Signed-off-by: baude <bbaude@redhat.com>
2018-09-14 13:49:58 -05:00
Urvashi Mohnani 70b160ae03 Search registries with an empty query
Adds functionality to search registries implementing the v2
endpoint with an empty query, that is the results will be
all the available images on the registries.
If this is tried with a v1 registry an error will occur.
To search a whole registry, there needs to be a trailing slash
at the end, i.e `podman search registry.fedoraproject.org/`.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #1444
Approved by: rhatdan
2018-09-13 16:20:40 +00:00
baude a6de23278a Use REGISTRIES_CONFIG_PATH for all tests
We should not be using the test systems registries.conf file for integration
tests. We should always use a constructed file created specifically for the
integration tests or we stand to have unpredictable results.  The beforeTest
function now sets an environment variable pointing to a registries.conf file
in the test's tempdir.  That file will container docker.io as a default.

The afterTest function then clears the environment variable.

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

Closes: #1197
Approved by: rhatdan
2018-08-02 12:40:14 +00:00
baude a8ae7eae9c Integration Test Improvements #3
Third round of speed improvements to the integration tests.

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

Closes: #1193
Approved by: rhatdan
2018-08-01 13:01:44 +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
umohnani8 3b9046a170 Remove the --registry flag from podman search
Instead of setting the --registry flag to search a single registry,
prefix the registry before the image name in the input, an example is
`podman search registry.fedoraproject.org/fedora` and this will search for
the fedora image in only registry.fedoraproject.org.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #1011
Approved by: rhatdan
2018-06-28 16:55:29 +00:00
haircommander d8f2cb8622 TLS verify is skipped per registry.
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #952
Approved by: rhatdan
2018-06-18 18:46:55 +00:00
haircommander b43677c9fd Added --tls-verify functionality to podman search, with tests
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #932
Approved by: baude
2018-06-15 17:09:33 +00:00
Yiqiao Pu e76caee338 Add some podman search test with filter
Add search test with filter stars, is-automated and is-official.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #662
Approved by: rhatdan
2018-04-24 13:42:37 +00:00
Yiqiao Pu 863196f303 Fix podman search no-trunc test
Add --no-trunc to the command line and add output check for the
lines not include "..." with this flag.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #662
Approved by: rhatdan
2018-04-24 13:42:37 +00:00
Yiqiao Pu 6a9dbf3305 Fix a typo
Update LineInOuputContains to LineInOutputContains.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #642
Approved by: rhatdan
2018-04-19 09:28:08 +00:00
baude c089cb9c92 Final ginkgo migration
Completion of the migration from bats to ginkgo.  This includes:

* load
* mount
* pause
* port
* run_networking
* search

Note: build will be done within a different PR

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 12:37:07 -06:00