From 1d0fe097a34c4eb4e723cce823fd5b12c7c20d5d Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Wed, 13 Mar 2024 03:43:31 +0100 Subject: [PATCH] simplify TestMainExecution conditions --- internal/testutil/acc/atlas.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/testutil/acc/atlas.go b/internal/testutil/acc/atlas.go index 45e546a56d..c388521290 100644 --- a/internal/testutil/acc/atlas.go +++ b/internal/testutil/acc/atlas.go @@ -15,14 +15,12 @@ import ( // TestMainExecution must be called from TestMain in the test package if ProjectIDExecution is going to be used. func TestMainExecution(m *testing.M) { - if !InUnitTest() { - atlasInfo.init = true - atlasInfo.resourceName = resourceName() - } + atlasInfo.init = true + atlasInfo.resourceName = resourceName() exitCode := m.Run() - if !InUnitTest() && atlasInfo.needsDeletion { + if atlasInfo.needsDeletion { fmt.Printf("Deleting execution project: %s, resource: %s\n", atlasInfo.projectName, atlasInfo.resourceName) deleteProject(atlasInfo.projectID) }