From e881ca28e485f5ee79180ae9180f44d0339fc165 Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Tue, 4 Oct 2016 15:16:09 +0000 Subject: [PATCH] acceptance: use sub-tests for TestDockerCLI. --- acceptance/cli_test.go | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/acceptance/cli_test.go b/acceptance/cli_test.go index 811998726061..71f5559b3b66 100644 --- a/acceptance/cli_test.go +++ b/acceptance/cli_test.go @@ -17,7 +17,6 @@ package acceptance import ( - "fmt" "path/filepath" "testing" @@ -53,22 +52,15 @@ func TestDockerCLI(t *testing.T) { for _, p := range paths { testFile := filepath.Base(p) testPath := filepath.Join(containerPath, testFile) - if verbose { - fmt.Printf("--- test: %s\n", testFile) - } - - cmd := cmdBase - if verbose { - cmd = append(cmd, "-d") - } - cmd = append(cmd, "-f", testPath, cluster.CockroachBinaryInContainer) - - if err := testDockerOneShot(t, "cli_test", cmd); err != nil { - fmt.Printf("--- %s FAIL\n", testFile) - t.Fatal(err) - } - if verbose { - fmt.Printf("--- %s SUCCESS\n", testFile) - } + t.Run(testFile, func(t *testing.T) { + cmd := cmdBase + if verbose { + cmd = append(cmd, "-d") + } + cmd = append(cmd, "-f", testPath, cluster.CockroachBinaryInContainer) + if err := testDockerOneShot(t, "cli_test", cmd); err != nil { + t.Error(err) + } + }) } }