skip the test if docker is not installed

pull/10464/head
Ilya Zuyev 2021-02-16 11:30:47 -08:00
parent 9dfccc632e
commit 53a3c9598d
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ func TestDebPackageInstall(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
rr, err := Run(t, exec.CommandContext(ctx, "docker", "version"))
if err != nil || rr.ExitCode != 0 {
t.Skip("docker is not installed")
}
pkgDir, err := filepath.Abs(filepath.Dir(Target()))
if err != nil {
t.Errorf("failed to get minikube path: %v", err)