Commit graph

174 commits

Author SHA1 Message Date
Yiqiao Pu f2658ecda2 Add one test case for check diff in container and committed image
The test steps are:
1. Start a container and touch a file under /tmp
2. Use diff to check the container
3. commit the change into a new image
4. Use diff to check the image

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

Closes: #643
Approved by: mheon
2018-04-19 14:19:04 +00:00
umohnani8 27107fdac1 Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed

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

Closes: #640
Approved by: baude
2018-04-19 14:08:47 +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
Nathan Williams 982927468c ip validation game too strong
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>

Closes: #635
Approved by: rhatdan
2018-04-18 10:58:24 +00:00
Nathan Williams 94f20cdd00 - reverse host field order (ip goes first)
- fix host string split to permit IPv6

Signed-off-by: Nathan Williams <nath.e.will@gmail.com>

Closes: #635
Approved by: rhatdan
2018-04-18 10:58:24 +00:00
Yiqiao Pu f1a4867bcd Add a function for check if command exist
Use this function to check if command exist before execute it
in our test.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:29 +08:00
Yiqiao Pu d6d7edb841 Add WaitContainerReady for wait for docker registry ready
Sometime podman push local registry still failed caused by the
docker registry is not start yet after sleep 5s in the test.
So add this function to check the container status by its output
and skip the test when the docker registry can not start normally
instead of failed the case.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:21 +08:00
Yiqiao Pu 0fe0c79dc9 Add several podman push tests
Add five tests for podman push tests:
- push to docker with authorization
- push to docker-archive
- push to docker-daemon
- push to oci-archive
- push to ostree

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-04-16 10:55:11 +08:00
baude 62b59df053 Allow the use of -i/-a on any container
We used to not allow the use of -a/-i on containers that were not
started with -i or a tty.  Given the improvements in our terminal
handling, this should work now.

This also fixes a systemic problem with the autotests.

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

Closes: #617
Approved by: baude
2018-04-14 13:48:35 +00:00
umohnani8 9aafc25a3d Fix secrets patch
The secrets code was just tarring and copying the contents of the secrets directory on host as is.
This meant it was not accounting for any symlinks inside the directory, leading up to the contents
not being copied over.

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

Closes: #611
Approved by: mheon
2018-04-13 21:25:15 +00:00
umohnani8 ac910c7aa8 Remove demos.sh file from test
I must have accidentally added this extra file in one of my older PRs.

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

Closes: #611
Approved by: mheon
2018-04-13 21:25:15 +00:00
Matthew Heon 8265294d78 Fix podman run --attach tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon 5eb9ebcf59 Add tests for podman attach
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #608
Approved by: baude
2018-04-13 18:43:44 +00:00
Matthew Heon b8394600d8 HACK temporary fix for test suite
We leak open files when creating new c/storage stores (locks do
not close themselves, so the open FDs in the test suite increase
every time we use c/storage to load cached images for the tests).
Fix this temporarily by increasing rlimits on open files until we
can create a permanent fix next release.

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

Closes: #615
Approved by: baude
2018-04-13 17:51:27 +00:00
Matthew Heon ec90d6f4cc Fix leaking files in Ginkgo
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #612
Approved by: rhatdan
2018-04-13 04:24:28 +00:00
umohnani8 998fd2ece0 Functionality changes to the following flags
--group-add
	--blkio-weight-device
	--device-read-bps
	--device-write-bps
	--device-read-iops
	--device-write-iops

--group-add now supports group names as well as the gid associated with them.
All the --device flags work now with moderate changes to the code to support both
bps and iops.
Added tests for all the flags.

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

Closes: #590
Approved by: mheon
2018-04-06 00:09:46 +00:00
Daniel J Walsh fdcf633a33 Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #155
Approved by: mheon
2018-04-05 14:13:49 +00:00
baude 35a10c9ba5 Only allocate tty when -t
In our ezrly development, we always allocated a tty when not -d.  Now we should only allocated when the user asks for it.

Resolves: #573

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

Closes: #574
Approved by: rhatdan
2018-04-03 22:23:23 +00:00
Daniel J Walsh 838df4eec4 Vendor in latest containers/image
Some more features.
    docker-archive generates docker legacy compatible images
    Do not create $DiffID subdirectories for layers with no configs
    Ensure the layer IDs in legacy docker/tarfile metadata are unique
    docker-archive: repeated layers are symlinked in the tar file
    sysregistries: remove all trailing slashes
    Improve docker/* error messages
    Fix failure to make auth directory
    Create a new slice in Schema1.UpdateLayerInfos
    Drop unused storageImageDestination.{image,systemContext}
    Load a *storage.Image only once in storageImageSource
    Support gzip for docker-archive files
    Remove .tar extension from blob and config file names
    ostree, src: support copy of compressed layers
    ostree: re-pull layer if it misses uncompressed_digest|uncompressed_size
    image: fix docker schema v1 -> OCI conversion
    Add /etc/containers/certs.d as default certs directory

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #569
Approved by: mheon
2018-04-03 14:48:52 +00:00
TomSweeneyRedHat 2eb38a0271 Sleep for 5 seconds before pushing to registry in tests
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #576
Approved by: rhatdan
2018-04-02 17:57:28 +00:00
baude 03ec980dcf Eliminate raceyness of sig-proxy test
Use a socket to coordinate between the test suite and the container and its
script.

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

Closes: #567
Approved by: rhatdan
2018-03-30 09:17:27 +00:00
baude 1e59053cc5 Allow sha256: prefix for input
We should allow users to pass in image ids with the sha256: prefix
for local images.

Resolves: #493

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

Closes: #560
Approved by: baude
2018-03-29 16:31:43 +00:00
umohnani8 8a96b4acbc Add secrets patch to podman
Adds support for mounting secrets especially on RHEL where the container
can use the host subsription to run yum

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

Closes: #544
Approved by: rhatdan
2018-03-29 14:15:27 +00:00
Matthew Heon 196c3ab3a5 Disable --sig-proxy tests due to race conditions
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #564
Approved by: rhatdan
2018-03-28 23:29:45 +00:00
Daniel J Walsh a3156da21c podman exec should handle options --env foo
If the user does not specify foo=bar, then the exec code should
look for the foo environment variable in its environment and pass it
in.  This is the way podman run works.

Also added tests to make sure this all works.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #552
Approved by: mheon
2018-03-26 23:27:00 +00:00
baude d364d41e1b Removing tagged images change in behavior
An image name is really just a tag.  When an image has multiple tags, we should be
able to "delete" the one of its tags without harm. In this case, the "delete' is
really a form of Untag (removing the tag from the image).

If an image has multiple tags and the user tries to delete by ID without force, this
should be denied because when you delete by ID there is no distinguishing it like
image tags.

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

Closes: #528
Approved by: mheon
2018-03-22 19:06:51 +00:00
baude 38a1b2f16d Image library stage 4 - create and commit
Migrate the podman create and commit subcommandis to leverage the images library.  I also had
to migrate the cmd/ portions of run and rmi.

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

Closes: #498
Approved by: mheon
2018-03-20 16:20:12 +00:00
Matthew Heon c80bfe1be1 Fix Travis tests for sig-proxy
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #511
Approved by: rhatdan
2018-03-16 18:03:25 +00:00
Daniel J Walsh d7acfb478e
Merge pull request #447 from mheon/sig_proxy
Add signal proxying to podman run and attach
2018-03-16 10:34:32 -04:00
Matthew Heon 2f533888a5 Fix E2E tests
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon 358f84ad39 Fix E2E tests
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon 05fb5a0aa7 Fix nit in restart E2E tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon 540a441234 Add tests for restart
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Yiqiao Pu eb33cc2193 Add a test case for remove the latest container
Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #508
Approved by: baude
2018-03-16 13:35:10 +00:00
Yiqiao Pu d560ddd102 Correct the test case name
Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #508
Approved by: baude
2018-03-16 13:35:10 +00:00
Matthew Heon cd73a6904d Add signal proxying to podman run, start, and attach
Also removes sig-proxy from 'podman create', where is does not
make sense.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-15 16:00:20 -04:00
Matthew Heon 99b959560a Fix test build
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
2018-03-15 17:45:11 +00:00
Matthew Heon 525d023c89 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
2018-03-15 17:45:11 +00:00
Matthew Heon 8d7dc94a27 Add extra E2E test for restarting containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
2018-03-15 17:45:11 +00:00
Matthew Heon d176e9f781 Fix broken 'podman start' test
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
2018-03-15 17:45:11 +00:00
Matthew Heon 4739fc2d98 Add test. Move attach code in start back
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
2018-03-15 17:45:11 +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
Matthew Heon 911e36dd0f Modify E2E tests to use alternate Conmon path if present
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #474
Approved by: rhatdan
2018-03-14 14:54:43 +00:00
Valentin Rothberg 62b93d1723 test/e2e/images_test.go: test with multiple tags
As podman-images(1) had some issues correctly reporting all RepoTags of
an image (in the default format), extend the e2e tests to avoid running
into similar in the future.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #477
Approved by: rhatdan
2018-03-14 14:01:53 +00:00
Valentin Rothberg 3fe87b011d make shell: build, test and run in a container
Some of the paths in the e2e tests are hard-coded, which complicates
testing a bit on systems with different paths for runc, conmon, etc.
Add a make shell target to the Makefile, which will build and run the
libpod containers, giving a shell to the user in which podman can be
built, run, tested etc.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #481
Approved by: rhatdan
2018-03-13 17:18:23 +00:00
Valentin Rothberg ce30acf1a0 Fix typo in test/README.md
s/tests/test/

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
Closes: #480
Approved by: rhatdan
2018-03-13 15:11:52 +00:00
Matthew Heon 33fe3287a3 Remove unused configs for testing CRI-O
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #473
Approved by: rhatdan
2018-03-12 14:38:41 +00:00
umohnani8 713c08630b Podman load can pull in compressed files
Podman load can now load in docker-archive files that are compressed.

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

Closes: #468
Approved by: baude
2018-03-08 21:23:53 +00:00
TomSweeneyRedHat 5ac9294a79 Add toggle for Docker install/deinstall for baseline test
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #461
Approved by: rhatdan
2018-03-08 07:23:16 +00:00
TomSweeneyRedHat 1e92a6f623 Add podman baseline test script
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #409
Approved by: rhatdan
2018-03-06 01:44:08 +00:00