summaryrefslogtreecommitdiffhomepage
path: root/runsc/test/root/BUILD
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-10-03 20:43:18 -0700
committerShentubot <shentubot@google.com>2018-10-03 20:44:20 -0700
commit3f46f2e5017106d1569f759b8d19aee6e9827c58 (patch)
tree8dfdc15d3af75e808944099ca2b0b85ea6ee12de /runsc/test/root/BUILD
parentbeac59b37a8b0ea834904870e5c236d2627947a2 (diff)
Fix sandbox chroot
Sandbox was setting chroot, but was not chaging the working dir. Added test to ensure this doesn't happen in the future. PiperOrigin-RevId: 215676270 Change-Id: I14352d3de64a4dcb90e50948119dc8328c9c15e1
Diffstat (limited to 'runsc/test/root/BUILD')
-rw-r--r--runsc/test/root/BUILD27
1 files changed, 27 insertions, 0 deletions
diff --git a/runsc/test/root/BUILD b/runsc/test/root/BUILD
new file mode 100644
index 000000000..dbc0f1d26
--- /dev/null
+++ b/runsc/test/root/BUILD
@@ -0,0 +1,27 @@
+package(licenses = ["notice"]) # Apache 2.0
+
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "root",
+ srcs = ["root.go"],
+ importpath = "gvisor.googlesource.com/gvisor/runsc/test/root",
+)
+
+go_test(
+ name = "root_test",
+ size = "small",
+ srcs = ["chroot_test.go"],
+ embed = [":root"],
+ tags = [
+ # Requires docker and runsc to be configured before the test runs.
+ # Also test only runs as root.
+ "manual",
+ "local",
+ ],
+ deps = [
+ "//runsc/specutils",
+ "//runsc/test/testutil",
+ "@com_github_syndtr_gocapability//capability:go_default_library",
+ ],
+)