blob: 14f578f2a7c253244a5498673c8c89eaf87a413d [file] [log] [blame] [edit]
package manila
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:"_manila_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/manila", &vars.HelmValues)
require.NoError(t, err)
testutils.TestDatabaseConf(t, vals.Conf.Manila.Database)
testutils.TestAllPodsHaveRuntimeClass(t, vals)
testutils.TestAllPodsHavePriorityClass(t, vals)
}