More decryption functions and stub test cases for AWS

This commit is contained in:
2025-09-05 08:41:03 +02:00
parent deb3c67d80
commit 6a1a7ba499
4 changed files with 293 additions and 28 deletions

31
aws_test.go Normal file
View 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
}