mirror of
https://github.com/containers/podman.git
synced 2025-07-03 09:17:15 +08:00
Merge pull request #25831 from Luap99/test-doc
update hack/bats to not PASS NOP env and update test README with more system test info
This commit is contained in:
@ -44,8 +44,6 @@ servers, because we can sudo *starting* the service but can't sudo
|
||||
stopping it: by the time the bats tests finish, the sudo timeout will
|
||||
have expired. We apologize for the inconvenience.)
|
||||
|
||||
$0 also passes through \$OCI_RUNTIME, should you need to test that.
|
||||
|
||||
Examples:
|
||||
|
||||
\$ $0 220:\"restart cleans up\"
|
||||
@ -137,7 +135,6 @@ if [[ "$TEST_ROOT" ]]; then
|
||||
sudo --preserve-env=PODMAN \
|
||||
--preserve-env=QUADLET \
|
||||
--preserve-env=PODMAN_TEST_DEBUG \
|
||||
--preserve-env=OCI_RUNTIME \
|
||||
--preserve-env=CONTAINERS_HELPER_BINARY_DIR \
|
||||
--preserve-env=PODMAN_ROOTLESS_USER \
|
||||
bats "${bats_opts[@]}" "${bats_filter[@]}" $TESTS
|
||||
|
@ -91,6 +91,8 @@ The following environment variables are supported by the test setup:
|
||||
- `PODMAN_DB`: the database backend `sqlite` (default) or `boltdb`.
|
||||
- `PODMAN_TEST_IMAGE_CACHE_DIR`: path were the container images should be cached, defaults to `/tmp`.
|
||||
|
||||
Note: These variables are used by the integration tests (test/e2e) only not the system tests (test/system).
|
||||
|
||||
### Running a single file of integration tests
|
||||
You can run a single file of integration tests using the go test command:
|
||||
|
||||
@ -143,7 +145,16 @@ System tests are used for testing the *podman* CLI in the context of a complete
|
||||
requires that *podman*, all dependencies, and configurations are in place. The intention of
|
||||
system testing is to match as closely as possible with real-world user/developer use-cases
|
||||
and environments. The orchestration of the environments and tests is left to external
|
||||
tooling.
|
||||
tooling. To test a specific oci runtime it should be set in containers.conf.
|
||||
(Note, upstream only tests with crun, there is no guarantee that tests will pass with another
|
||||
runtime. We will accept patches to make the tests work with runc, e.g. mostly error message
|
||||
checks, but not other runtimes due to the high maintenance overhead.)
|
||||
|
||||
Only the following env vars are supported:
|
||||
- `PODMAN`: path to the podman binary, defaults to `podman` in $PATH.
|
||||
- `QUADLET`: path to the quadlet binary, defaults to `/usr/libexec/podman/quadlet`.
|
||||
- `PODMAN_TESTING`: path to the podman-testing binary, defaults to `../../bin/podman-testing` from the system test directory.
|
||||
Note, the binary is used for testing purposes only and is not expected to be shipped to end users.
|
||||
|
||||
System tests use Bash Automated Testing System (`bats`) as a testing framework.
|
||||
Install it via your package manager or get latest stable version
|
||||
|
Reference in New Issue
Block a user