5774599438
This change has the listTests() function return a string slice of all the tests. Originally, I planned not to modify the listTests() function and instead capture the output of it and then iterate through the captured output. I decided against this approach as most of the test binaries already produce a slice as they collect tests through filepath.Walk(). Now I use this slice and return it so that I can iterate through in runAllTests() and also when printing out the tests. PiperOrigin-RevId: 259599782 |
||
---|---|---|
.. | ||
image | ||
integration | ||
root | ||
runtimes | ||
testutil | ||
BUILD | ||
README.md | ||
build_defs.bzl | ||
install.sh |
README.md
Tests
The tests defined under this path are verifying functionality beyond what unit tests can cover, e.g. integration and end to end tests. Due to their nature, they may need extra setup in the test machine and extra configuration to run.
- integration: defines integration tests that uses
docker run
to test functionality. - image: basic end to end test for popular images.
- root: tests that require to be run as root.
- testutil: utilities library to support the tests.
The following setup steps are required in order to run these tests:
`./runsc/test/install.sh [--runtime <name>]`
The tests expect the runtime name to be provided in the RUNSC_RUNTIME
environment variable (default: runsc-test
). To run the tests execute:
bazel test --test_env=RUNSC_RUNTIME=runsc-test \
//runsc/test/image:image_test \
//runsc/test/integration:integration_test