summaryrefslogtreecommitdiff
path: root/test/e2e/checkpoint_test.go
Commit message (Collapse)AuthorAge
* Remove build \!remote flags from testDaniel J Walsh2020-11-18
| | | | | | | | Add some more tests, document cases where remote will not work Add FIXMEs for tests that should work on podman-remote but currently do not. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Make all Skips specify a reasonDaniel J Walsh2020-09-29
| | | | | | Always use CGROUPV2 rather then reading from system all the time. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Remove SkipIfRootless if possible, document other callsDaniel J Walsh2020-09-27
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Switch all references to github.com/containers/libpod -> podmanDaniel J Walsh2020-07-28
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Change buildtag for remoteclient to remote for testingDaniel J Walsh2020-07-06
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* move go module to v2Valentin Rothberg2020-07-06
| | | | | | | | | | | | | | | 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>
* e2e: disable checkpoint test on UbuntuValentin Rothberg2020-06-08
| | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Enable Ubuntu tests in CIBrent Baude2020-06-08
| | | | | | Add updates required for ubuntu and run integration tests Signed-off-by: Brent Baude <bbaude@redhat.com>
* checkpoint: change runtime checkpoint support testAdrian Reber2020-04-03
| | | | | | | | | | | | | | | | | Podman was checking if the runtime support checkpointing by running 'runtime checkpoint -h'. That works for runc. crun, however, does not use '-h, --help' for help output but, '-?, --help'. This commit switches both checkpoint support detection from 'runtime checkpoint -h' to 'runtime checkpoint --help'. Podman can now correctly detect if 'crun' also support checkpointing. Signed-off-by: Adrian Reber <areber@redhat.com>
* Correctly export the root file-system changesAdrian Reber2019-12-09
| | | | | | | | | | | | | | | | When doing a checkpoint with --export the root file-system diff was not working as expected. Instead of getting the changes from the running container to the highest storage layer it got the changes from the highest layer to that parent's layer. For a one layer container this could mean that the complete root file-system is part of the checkpoint. With this commit this changes to use the same functionality as 'podman diff'. This actually enables to correctly diff the root file-system including tracking deleted files. This also removes the non-working helper functions from libpod/diff.go. Signed-off-by: Adrian Reber <areber@redhat.com>
* Disable checkpointing of containers started with --rmAdrian Reber2019-11-28
| | | | | | | | | | | | | Trying to checkpoint a container started with --rm works, but it makes no sense as the container, including the checkpoint, will be deleted after writing the checkpoint. This commit inhibits checkpointing containers started with '--rm' unless '--export' is used. If the checkpoint is exported it can easily be restored from the exported checkpoint, even if '--rm' is used. To restore a container from a checkpoint it is even necessary to manually run 'podman rm' if the container is not started with '--rm'. Signed-off-by: Adrian Reber <areber@redhat.com>
* podman: add support for specifying MACJakub Filak2019-11-06
| | | | | | | | I basically copied and adapted the statements for setting IP. Closes #1136 Signed-off-by: Jakub Filak <jakub.filak@sap.com>
* Refactor tests when checking for error exit codesJhon Honce2019-10-16
| | | | | | | Rather than checking for non-zero, we need to check for >0 to distinguish between timeouts and error exit codes. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Test that restored container does not depend on the original containerAdrian Reber2019-08-09
| | | | | | | | | | | In the restore from external checkpoint archive test, the second restore using a new name and ID is now done first to ensure that nothing in the restored container depends on the original container. Test has been adapted to catch errors like the one fixed with the previous commit to adapt ConmonPidFile for restored containers. Signed-off-by: Adrian Reber <areber@redhat.com>
* restore: added --ignore-static-ip optionAdrian Reber2019-08-02
| | | | | | | | | | If a container is restored multiple times from an exported checkpoint with the help of '--import --name', the restore will fail if during 'podman run' a static container IP was set with '--ip'. The user can tell the restore process to ignore the static IP with '--ignore-static-ip'. Signed-off-by: Adrian Reber <areber@redhat.com>
* Add new exit codes to rm & rmi for running containers & dependenciesDaniel J Walsh2019-08-01
| | | | | | | | | | | | This enables programs and scripts wrapping the podman command to handle 'podman rm' and 'podman rmi' failures caused by paused or running containers or due to images having other child images or dependent containers. These errors are common enough that it makes sense to have a more machine readable way of detecting them than parsing the standard error output. Signed-off-by: Ondrej Zoder <ozoder@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Move random IP code for tests from checkpoint to commonAdrian Reber2019-07-29
| | | | | | | | | The function to generate random IP addresses during ginkgo tests in the checkpoint test code is moved to common and all tests using hardcoded IP addresses have been changed to use random IP addresses to reduce test errors when running the tests in parallel. Signed-off-by: Adrian Reber <areber@redhat.com>
* Add tests for --ignore-rootfs checkpoint/restore optionAdrian Reber2019-07-11
| | | | | | | | | | | This adds three tests for the --ignore-rootfs option to verify that it works in all combination. 1. Not used at all 2. Only used during restore 3. Only used during checkpoint Signed-off-by: Adrian Reber <areber@redhat.com>
* Use random IP addresses during checkpoint/restore testsAdrian Reber2019-07-09
| | | | | | | | This tries to reduce CI errors which might happen due to parallel CI runs which all are using the same IP addresses. Using random addresses should reduce the possibility of parallel tests using the same IP address. Signed-off-by: Adrian Reber <areber@redhat.com>
* Add exec after checkpoint/restore testAdrian Reber2019-06-25
| | | | | | | | | | | | | | A container restored from a checkpoint archive used to have the root file-system mounted with a wrong (new) SELinux label. This made it, for example, impossible to use 'podman exec' on a restored container. This test tests exactly this. 'podman exec' after 'podman container restore'. Unfortunately this test does not fail, even without the patch that fixes it as the test seems to run in an environment where the SELinux label of the container root file-system is not relevant. Somehow. Signed-off-by: Adrian Reber <areber@redhat.com>
* migration: add possibility to restore a container with a new nameAdrian Reber2019-06-04
| | | | | | | | | | | | | | | | | | | | The option to restore a container from an external checkpoint archive (podman container restore -i /tmp/checkpoint.tar.gz) restores a container with the same name and same ID as id had before checkpointing. This commit adds the option '--name,-n' to 'podman container restore'. With this option the restored container gets the name specified after '--name,-n' and a new ID. This way it is possible to restore one container multiple times. If a container is restored with a new name Podman will not try to request the same IP address for the container as it had during checkpointing. This implicitly assumes that if a container is restored from a checkpoint archive with a different name, that it will be restored multiple times and restoring a container multiple times with the same IP address will fail as each IP address can only be used once. Signed-off-by: Adrian Reber <areber@redhat.com>
* Add test case for container migrationAdrian Reber2019-06-03
| | | | | | | | | | | | | | | The difference between container checkpoint/restore and container migration is that for migration the container which was checkpointed must not exist during restore. To simulate migration the container is remove ('podman rm -fa') before being restored. The migration test does following steps: * podman run * podman container checkpoint -l -e /tmp/checkpoint.tar.gz * podman rm -fa * podman container restore -i /tmp/checkpoint.tar.gz Signed-off-by: Adrian Reber <areber@redhat.com>
* use imagecaches for local testsbaude2019-05-29
| | | | | | | | | 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>
* Only run checkpoint/restore tests on Fedora >= 29Adrian Reber2019-05-06
| | | | | | | | | | Only Fedora 29 and newer has an updated container-selinux and selinux-policy new enough to support CRIU in restoring threaded processes in a container with SELinux enabled. Also skip checkpoint/restore tests if rootless. CRIU requires root. Signed-off-by: Adrian Reber <areber@redhat.com>
* ginkgo status improvementsbaude2019-03-08
| | | | | | | 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>
* Merge pull request #2485 from adrianreber/oci-checkOpenShift Merge Robot2019-03-01
|\ | | | | Verify that used OCI runtime supports checkpoint
| * Verify that used OCI runtime supports checkpointAdrian Reber2019-03-01
| | | | | | | | | | | | | | | | | | | | To be able to use OCI runtimes which do not implement checkpoint/restore this adds a check to the checkpoint code path and the checkpoint/restore tests to see if it knows about the checkpoint subcommand. If the used OCI runtime does not implement checkpoint/restore the tests are skipped and the actual 'podman container checkpoint' returns an error. Signed-off-by: Adrian Reber <areber@redhat.com>
* | Skip checkpoint/restore tests on Fedora for nowAdrian Reber2019-02-27
|/ | | | | | | | | | | | | | There is currently still one SELinux related checkpoint/restore problem: https://github.com/containers/libpod/issues/2334 To avoid unnecessary CI failures the checkpoint/restore tests are temporarily disabled on Fedora. It is not necessary to disable the tests on Ubuntu as it is running without SELinux and it is also not necessary to disable the RHEL 7 tests as RHEL's CRIU is too old to run the checkpoint/restore tests at all. Signed-off-by: Adrian Reber <areber@redhat.com>
* Run integrations test with remote-clientbaude2019-01-14
| | | | | | | | | | | | 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>
* Added checkpoint/restore test for same IPAdrian Reber2019-01-09
| | | | | | | | Restoring a container from a checkpoint should give the container the same IP as before checkpointing. This adds a test to make sure the IP stays the same. Signed-off-by: Adrian Reber <areber@redhat.com>
* Enable checkpoint test with established TCP connectionsAdrian Reber2019-01-09
| | | | Signed-off-by: Adrian Reber <areber@redhat.com>
* Re-enable checkpoint/restore CI tests on FedoraAdrian Reber2018-12-28
| | | | | | | | Now that the correct distribution CRIU packages are installed the checkpoint/restore tests should no longer fail. This re-enables the disabled tests on Fedora. Signed-off-by: Adrian Reber <areber@redhat.com>
* Skip checkpoint tests on Fedora <30Chris Evich2018-12-14
| | | | Signed-off-by: Chris Evich <cevich@redhat.com>
* disable checkpoint tests on f29baude2018-11-28
| | | | | | temporarily disabling checkpoint tests on f29 as they don't currently pass. Signed-off-by: baude <bbaude@redhat.com>
* Added more checkpoint/restore test casesAdrian Reber2018-11-28
| | | | | | | | | | This adds checkpoint/restore test cases for the newly added options * --leave-running * --tcp-established * --all * --latest Signed-off-by: Adrian Reber <areber@redhat.com>
* Separate common used test functions and structs to test/utilsYiqiao Pu2018-11-16
| | | | | | | 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>
* tests: use existing CRIU version checkAdrian Reber2018-10-23
| | | | | | | Do not re-implement the CRIU version check in the test suite, use it from libpod/pkg/criu. Signed-off-by: Adrian Reber <areber@redhat.com>
* tests: add checkpoint/restore testAdrian Reber2018-10-03
Signed-off-by: Adrian Reber <areber@redhat.com>