blob: 07ec9abda97d85fc6d3a03155b8fbcdabb55e780 [file] [log] [blame] [edit]
package staffeln
import (
_ "embed"
"os"
"testing"
"github.com/goccy/go-yaml"
"github.com/stretchr/testify/require"
"github.com/vexxhost/atmosphere/internal/openstack_helm"
"github.com/vexxhost/atmosphere/internal/testutils"
)
var (
//go:embed vars/main.yml
varsFile []byte
vars Vars
)
type Vars struct {
openstack_helm.HelmValues `yaml:"_staffeln_helm_values"`
}
func TestMain(m *testing.M) {
t := &testing.T{}
err := yaml.UnmarshalWithOptions(varsFile, &vars)
require.NoError(t, err)
code := m.Run()
os.Exit(code)
}
func TestHelmValues(t *testing.T) {
vals, err := openstack_helm.CoalescedHelmValues("../../charts/staffeln", &vars.HelmValues)
require.NoError(t, err)
testutils.TestDatabaseConf(t, vals.Conf.Staffeln.Database)
}