aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/gpg
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/gpg')
-rw-r--r--lib/crypto/gpg/gpg_test.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/crypto/gpg/gpg_test.go b/lib/crypto/gpg/gpg_test.go
index e34cc2bb..25d73693 100644
--- a/lib/crypto/gpg/gpg_test.go
+++ b/lib/crypto/gpg/gpg_test.go
@@ -3,7 +3,6 @@ package gpg
import (
"bytes"
"io"
- "os"
"os/exec"
"strings"
"testing"
@@ -17,13 +16,7 @@ func initGPGtest(t *testing.T) {
}
// temp dir is automatically deleted by the test runtime
dir := t.TempDir()
- // t.Setenv is only available since go 1.17
- if err := os.Setenv("GNUPGHOME", dir); err != nil {
- t.Fatalf("failed to set GNUPGHOME: %s", err)
- }
- t.Cleanup(func() {
- os.Unsetenv("GNUPGHOME")
- })
+ t.Setenv("GNUPGHOME", dir)
t.Logf("using GNUPGHOME = %s", dir)
}