Fix more awskms test brokenness

This commit is contained in:
Jeff Mitchell 2018-11-13 13:01:40 -05:00
parent e5aad14d79
commit 9735bd7d69
1 changed files with 4 additions and 0 deletions

View File

@ -23,7 +23,9 @@ func TestAWSKMSSeal(t *testing.T) {
}
// Set the key
oldKeyID := os.Getenv(EnvAWSKMSSealKeyID)
os.Setenv(EnvAWSKMSSealKeyID, awsTestKeyID)
defer os.Setenv(EnvAWSKMSSealKeyID, oldKeyID)
_, err = s.SetConfig(nil)
if err != nil {
t.Fatal(err)
@ -38,7 +40,9 @@ func TestAWSKMSSeal_Lifecycle(t *testing.T) {
s.client = &mockAWSKMSSealClient{
keyID: aws.String(awsTestKeyID),
}
oldKeyID := os.Getenv(EnvAWSKMSSealKeyID)
os.Setenv(EnvAWSKMSSealKeyID, awsTestKeyID)
defer os.Setenv(EnvAWSKMSSealKeyID, oldKeyID)
testEncryptionRoundTrip(t, s)
}