From ce9b4a96602c83687aeb379cb51810142409d667 Mon Sep 17 00:00:00 2001 From: ostempel Date: Wed, 9 Oct 2024 13:44:48 +0200 Subject: [PATCH] fix linting --- cmd/internal/encryption/encryption_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/internal/encryption/encryption_test.go b/cmd/internal/encryption/encryption_test.go index db2fd80..fb60aa6 100644 --- a/cmd/internal/encryption/encryption_test.go +++ b/cmd/internal/encryption/encryption_test.go @@ -27,7 +27,6 @@ func TestEncrypter(t *testing.T) { input, err := fs.Create("encrypt") require.NoError(t, err) - defer fs.Remove(input.Name()) cleartextInput := []byte("This is the content of the file") err = afero.WriteFile(fs, input.Name(), cleartextInput, 0600) @@ -55,6 +54,11 @@ func TestEncrypter(t *testing.T) { require.NoError(t, err) _, err = e.Decrypt(bigEncFile) require.NoError(t, err) - fs.Remove("bigfile.test") - fs.Remove("bigfile.test.aes") + + err = fs.Remove(input.Name()) + require.NoError(t, err) + err = fs.Remove("bigfile.test") + require.NoError(t, err) + err = fs.Remove("bigfile.test.aes") + require.NoError(t, err) }