summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/common/BUILD
diff options
context:
space:
mode:
authorBrett Landau <brettlandau@google.com>2019-08-09 15:34:44 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-09 15:35:58 -0700
commitf2762e8c60b0a83f976c9eedd4a8c08e32cb6856 (patch)
tree1da65dc39e6725e87653638b170bf4547c569f3b /test/runtimes/common/BUILD
parent5a38eb120abe0aecd4b64cf9e3a9e1ff1dc0edd7 (diff)
Create tests for common.Search().
Using the path_test.go file built by the Golang devs as a base, tests have been created to verify the functionality of common.Search(). A mock file system is created and fake test files are generated to see if they get picked up by common.Search(). Also included in this CL is a bug fix for proctor-nodejs that was discovered using this test. proctor-nodejs used to allow multiple "-" in its test name filter. The regex has been updated to prevent this. PiperOrigin-RevId: 262647263
Diffstat (limited to 'test/runtimes/common/BUILD')
-rw-r--r--test/runtimes/common/BUILD12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/runtimes/common/BUILD b/test/runtimes/common/BUILD
index 7147e841a..1b39606b8 100644
--- a/test/runtimes/common/BUILD
+++ b/test/runtimes/common/BUILD
@@ -1,4 +1,4 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(licenses = ["notice"])
@@ -8,3 +8,13 @@ go_library(
importpath = "gvisor.dev/gvisor/test/runtimes/common",
visibility = ["//:sandbox"],
)
+
+go_test(
+ name = "common_test",
+ size = "small",
+ srcs = ["common_test.go"],
+ deps = [
+ ":common",
+ "//runsc/test/testutil",
+ ],
+)