Initial import
This commit is contained in:
25
vault_test.go
Normal file
25
vault_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package secret
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVault(t *testing.T) {
|
||||
testKey := os.Getenv("TEST_VAULT_KEY")
|
||||
if testKey == "" {
|
||||
t.Skip("TEST_VAULT_KEY not set, which should contain the path to a secret for testing")
|
||||
return
|
||||
}
|
||||
testValue := os.Getenv("TEST_VAULT_VALUE")
|
||||
if testValue == "" {
|
||||
t.Skip("TEST_VAULT_VALUE not set, which should contain the secret value for testing")
|
||||
return
|
||||
}
|
||||
|
||||
p := Vault()
|
||||
testProvider(t, p, testProviderCase{
|
||||
Key: testKey,
|
||||
Test: testEqualString(testValue),
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user