summaryrefslogtreecommitdiffhomepage
path: root/runsc/dockerutil
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-04-20 15:47:16 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-20 15:48:27 -0700
commit1a597e01bed5d5fb30b3d444e0a23669c5587235 (patch)
tree9fb4a801399ba8713fc6c3d2b79046f26e06023a /runsc/dockerutil
parent07b1b4cc98552a7d45d673ce1e4d1222bbffca7d (diff)
Add a functional vm_test for root_test.
This change renames the tools/images directory to tools/vm for clarity, and adds a functional vm_test. Sharding is also added to the same test, and some documentation added around key flags & variables to describe how they work. Subsequent changes will add vm_tests for other cases, such as the runtime tests. PiperOrigin-RevId: 307492245
Diffstat (limited to 'runsc/dockerutil')
-rw-r--r--runsc/dockerutil/dockerutil.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/runsc/dockerutil/dockerutil.go b/runsc/dockerutil/dockerutil.go
index 1ff5e8cc3..f009486bc 100644
--- a/runsc/dockerutil/dockerutil.go
+++ b/runsc/dockerutil/dockerutil.go
@@ -36,8 +36,18 @@ import (
)
var (
+ // runtime is the runtime to use for tests. This will be applied to all
+ // containers. Note that the default here ("runsc") corresponds to the
+ // default used by the installations. This is important, because the
+ // default installer for vm_tests (in tools/installers:head, invoked
+ // via tools/vm:defs.bzl) will install with this name. So without
+ // changing anything, tests should have a runsc runtime available to
+ // them. Otherwise installers should update the existing runtime
+ // instead of installing a new one.
runtime = flag.String("runtime", "runsc", "specify which runtime to use")
- config = flag.String("config_path", "/etc/docker/daemon.json", "configuration file for reading paths")
+
+ // config is the default Docker daemon configuration path.
+ config = flag.String("config_path", "/etc/docker/daemon.json", "configuration file for reading paths")
)
// EnsureSupportedDockerVersion checks if correct docker is installed.