From 8ba8b229c37e0cf299f1acb2a3b9d23ec569da4f Mon Sep 17 00:00:00 2001 From: Onsi Fakhouri Date: Tue, 30 May 2023 19:37:47 -0600 Subject: [PATCH] ensure report directory tests work when run in parallel --- reporters/json_report_test.go | 2 +- reporters/junit_report_test.go | 2 +- reporters/teamcity_report_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reporters/json_report_test.go b/reporters/json_report_test.go index 515e572d4..23433e180 100644 --- a/reporters/json_report_test.go +++ b/reporters/json_report_test.go @@ -57,7 +57,7 @@ var _ = Describe("JSONReport", func() { var filePath string BeforeEach(func() { - folderPath = filepath.Join("test_outputs") + folderPath = filepath.Join(fmt.Sprintf("test_outputs_%d", GinkgoParallelProcess())) fileName := fmt.Sprintf("report-%d", GinkgoParallelProcess()) filePath = filepath.Join(folderPath, fileName) diff --git a/reporters/junit_report_test.go b/reporters/junit_report_test.go index c5bc51af9..78c92edc0 100644 --- a/reporters/junit_report_test.go +++ b/reporters/junit_report_test.go @@ -379,7 +379,7 @@ var _ = Describe("JunitReport", func() { var filePath string BeforeEach(func() { - folderPath = filepath.Join("test_outputs") + folderPath = filepath.Join(fmt.Sprintf("test_outputs_%d", GinkgoParallelProcess())) fileName := fmt.Sprintf("report-%d", GinkgoParallelProcess()) filePath = filepath.Join(folderPath, fileName) diff --git a/reporters/teamcity_report_test.go b/reporters/teamcity_report_test.go index b768f5c4c..a7fe55e89 100644 --- a/reporters/teamcity_report_test.go +++ b/reporters/teamcity_report_test.go @@ -57,7 +57,7 @@ var _ = Describe("TeamCityReport", func() { var filePath string BeforeEach(func() { - folderPath = filepath.Join("test_outputs") + folderPath = filepath.Join(fmt.Sprintf("test_outputs_%d", GinkgoParallelProcess())) fileName := fmt.Sprintf("report-%d", GinkgoParallelProcess()) filePath = filepath.Join(folderPath, fileName)