diff options
Diffstat (limited to 'pkg/test')
-rw-r--r-- | pkg/test/criutil/criutil.go | 3 | ||||
-rw-r--r-- | pkg/test/dockerutil/dockerutil.go | 5 | ||||
-rw-r--r-- | pkg/test/testutil/BUILD | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/pkg/test/criutil/criutil.go b/pkg/test/criutil/criutil.go index 4c63d669a..66f10c016 100644 --- a/pkg/test/criutil/criutil.go +++ b/pkg/test/criutil/criutil.go @@ -103,6 +103,9 @@ func (cc *Crictl) Create(podID, contSpecFile, sbSpecFile string) (string, error) // need to parse the version and add an appropriate --no-pull argument // since the image has already been loaded locally. out, err := cc.run("-v") + if err != nil { + return "", err + } r := regexp.MustCompile("crictl version ([0-9]+)\\.([0-9]+)\\.([0-9+])") vs := r.FindStringSubmatch(out) if len(vs) != 4 { diff --git a/pkg/test/dockerutil/dockerutil.go b/pkg/test/dockerutil/dockerutil.go index f95ae3cd1..df09babf3 100644 --- a/pkg/test/dockerutil/dockerutil.go +++ b/pkg/test/dockerutil/dockerutil.go @@ -119,3 +119,8 @@ func Save(logger testutil.Logger, image string, w io.Writer) error { cmd.Stdout = w // Send directly to the writer. return cmd.Run() } + +// Runtime returns the value of the flag runtime. +func Runtime() string { + return *runtime +} diff --git a/pkg/test/testutil/BUILD b/pkg/test/testutil/BUILD index 03b1b4677..2d8f56bc0 100644 --- a/pkg/test/testutil/BUILD +++ b/pkg/test/testutil/BUILD @@ -15,6 +15,6 @@ go_library( "//runsc/boot", "//runsc/specutils", "@com_github_cenkalti_backoff//:go_default_library", - "@com_github_opencontainers_runtime-spec//specs-go:go_default_library", + "@com_github_opencontainers_runtime_spec//specs-go:go_default_library", ], ) |