From 0f90661bf54578c111d1c0fcceb592bd978ced98 Mon Sep 17 00:00:00 2001 From: matoval Date: Thu, 12 Dec 2024 13:22:22 -0800 Subject: [PATCH] Clean up tests --- pkg/types/main_test.go | 3 +++ pkg/workceptor/command_test.go | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/types/main_test.go b/pkg/types/main_test.go index 2038163f7..1d82b1c6d 100644 --- a/pkg/types/main_test.go +++ b/pkg/types/main_test.go @@ -31,6 +31,9 @@ func TestMainInitNodeID(t *testing.T) { } else if err != nil && err.Error() != testCase.expectedErr { t.Errorf("expected error to be %s, but got: %s", testCase.expectedErr, err.Error()) } + t.Cleanup(func() { + cfg = NodeCfg{} + }) }) } } diff --git a/pkg/workceptor/command_test.go b/pkg/workceptor/command_test.go index 985bbd96f..13634d242 100644 --- a/pkg/workceptor/command_test.go +++ b/pkg/workceptor/command_test.go @@ -101,7 +101,6 @@ func TestUnredactedStatus(t *testing.T) { statusLock := &sync.RWMutex{} for _, testCase := range restartTestCases { t.Run(testCase.name, func(t *testing.T) { - t.Parallel() mockBaseWorkUnit.EXPECT().GetStatusLock().Return(statusLock).Times(2) mockBaseWorkUnit.EXPECT().GetStatusWithoutExtraData().Return(&workceptor.StatusFileData{}) mockBaseWorkUnit.EXPECT().GetStatusCopy().Return(workceptor.StatusFileData{