From bc4a0ae32fd9429b004d7c7e7f5ed76098420bca Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Wed, 13 Nov 2024 15:55:37 +0100 Subject: [PATCH] Update internal/pkg/file/atomic_test.go Co-authored-by: Kimmo Lehto Signed-off-by: Tom Wieczorek --- internal/pkg/file/atomic_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/pkg/file/atomic_test.go b/internal/pkg/file/atomic_test.go index a303ff3adc40..799eb7774dab 100644 --- a/internal/pkg/file/atomic_test.go +++ b/internal/pkg/file/atomic_test.go @@ -87,9 +87,8 @@ func TestWriteAtomically(t *testing.T) { assertDirEmpty := func(t *testing.T, dir string) { t.Helper() entries, err := os.ReadDir(dir) - if assert.NoError(t, err) { - assert.Empty(t, entries) - } + assert.Empty(t, entries) + assert.NoError(t, err) } t.Run("writeFails", func(t *testing.T) {