You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
476 B

package vault_test
import (
"testing"
"time"
"github.com/stretchr/testify/require"
"gitoa.ru/go-4devs/config/provider/vault"
"gitoa.ru/go-4devs/config/test"
)
func TestProvider(t *testing.T) {
t.Parallel()
cl, err := test.NewVault()
require.NoError(t, err)
provider := vault.NewSecretKV2(cl)
read := []test.Read{
test.NewReadConfig("database"),
test.NewRead("db:dsn", test.DSN),
test.NewRead("db:timeout", time.Minute),
}
test.Run(t, provider, read)
}