Newer
Older
package runner
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestConfig(t *testing.T) {
configDir := "fixtures/"
require.NoError(t, err)
// first config.spec.variables entry name should be VAULT_KV in our test file
assert.Equal(t, "VAULT_KV", config.Spec.Variables[0].Name)
// the postgres chart should have been expanded with our variables
assert.Equal(
t,
`config:
datasource:
password: <path:cnpp.k8s.cloudcrane.io/data/ns1/postgres#password>
fullnameoverride: pg-exporter-ns1
`,
config.Spec.Charts["postgres"].Values,
)