More decryption functions and stub test cases for AWS
This commit is contained in:
31
aws_test.go
Normal file
31
aws_test.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package secret
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAWSKeyManagement(t *testing.T) {
|
||||
if !testAWSAvailable(t) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestAWSParameterStorage(t *testing.T) {
|
||||
if !testAWSAvailable(t) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func testAWSAvailable(t *testing.T) bool {
|
||||
t.Helper()
|
||||
if os.Getenv("AWS_ACCESS_KEY")+os.Getenv("AWS_ACCESS_KEY_ID") == "" {
|
||||
t.Skip("AWS_ACCESS_KEY or AWS_ACCESS_KEY_ID not set, which should contain the access key for testing")
|
||||
return false
|
||||
}
|
||||
if os.Getenv("AWS_SECRET_ACCESS_KEY")+os.Getenv("AWS_SECRET_KEY") == "" {
|
||||
t.Skip("AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not set, which should contain the secret key for testing")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user