test: enforce tenv usage in tests
This commit is contained in:
parent
20f5f050f3
commit
3fca6c0bf5
5 changed files with 8 additions and 11 deletions
|
@ -30,10 +30,8 @@ func TestGPGGit(t *testing.T) {
|
|||
err := os.Chmod(tmpDir, 0o700)
|
||||
assert.NoError(t, err)
|
||||
|
||||
oldGNUPGHome := os.Getenv("GNUPGHOME")
|
||||
err = os.Setenv("GNUPGHOME", tmpDir)
|
||||
t.Setenv("GNUPGHOME", tmpDir)
|
||||
assert.NoError(t, err)
|
||||
defer os.Setenv("GNUPGHOME", oldGNUPGHome)
|
||||
|
||||
// Need to create a root key
|
||||
rootKeyPair, err := importTestingKey()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue