From df7abc604b159117657e90b6cb456e3706eda485 Mon Sep 17 00:00:00 2001 From: Jacques Chester Date: Sat, 18 Aug 2018 14:21:18 -0400 Subject: [PATCH] Nest and parallelise tests [jchesterpivotal/concourse-build-resource#4] Signed-off-by: Jacques Chester --- cmd/build-pass-fail/main_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/build-pass-fail/main_test.go b/cmd/build-pass-fail/main_test.go index 440f4cc..e13e1ac 100644 --- a/cmd/build-pass-fail/main_test.go +++ b/cmd/build-pass-fail/main_test.go @@ -60,7 +60,7 @@ func TestBuildPassFail(t *testing.T) { gt.Eventually(session.Err).Should(gbytes.Say("could not parse build/build.json")) }) }) - }) + }, spec.Nested()) when("a path to a json file is given", func() { it.Before(func() { @@ -75,7 +75,7 @@ func TestBuildPassFail(t *testing.T) { it("opens and attempts to parse the file", func() { gt.Eventually(session.Err).Should(gbytes.Say("could not parse build/a-passed-in-file.json")) }) - }) + }, spec.Nested()) when("there is a well-formed JSON file", func() { when("the file represents a successful build", func() { @@ -133,7 +133,7 @@ func TestBuildPassFail(t *testing.T) { gt.Eventually(session).Should(gexec.Exit(1)) }) }) - }) + }, spec.Nested(), spec.Parallel()) when("the JSON file is malformed", func() { it.Before(func() { @@ -151,7 +151,7 @@ func TestBuildPassFail(t *testing.T) { it("fails with an error", func() { gt.Eventually(session.Err).Should(gbytes.Say("could not parse build/malformed-build.json")) }) - }) + }, spec.Nested()) }, spec.Report(report.Terminal{})) gexec.CleanupBuildArtifacts()