gvisor/runsc/test
Fabricio Voznika 356d1be140 Allow 'runsc do' to run without root
'--rootless' flag lets a non-root user execute 'runsc do'.
The drawback is that the sandbox and gofer processes will
run as root inside a user namespace that is mapped to the
caller's user, intead of nobody. And network is defaulted
to '--network=host' inside the root network namespace. On
the bright side, it's very convenient for testing:

runsc --rootless do ls
runsc --rootless do curl www.google.com

PiperOrigin-RevId: 252840970
2019-06-12 09:41:50 -07:00
..
image gvisor/runsc/tests: set timeout for http.Get() 2019-05-13 00:50:44 -07:00
integration Copy up parent when binding UDS on overlayfs 2019-06-06 16:45:51 -07:00
root Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
testutil Allow 'runsc do' to run without root 2019-06-12 09:41:50 -07:00
README.md netstack: reduce MSS from SYN to account tcp options 2019-03-19 17:33:20 -07:00
install.sh Fix runsc restore to be compatible with docker start --checkpoint ... 2019-05-03 21:41:45 -07:00

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