blob: 9377c015ef7443fa8bb742af1d65fed498f3ed0a [file] [log] [blame]
Mohammed Naserc6e431b2024-03-15 01:21:44 -04001package staffeln
2
3import (
4 _ "embed"
5 "os"
6 "testing"
7
8 "github.com/goccy/go-yaml"
9 "github.com/stretchr/testify/require"
10
11 "github.com/vexxhost/atmosphere/internal/openstack_helm"
12 "github.com/vexxhost/atmosphere/internal/testutils"
13)
14
15var (
16 //go:embed vars/main.yml
17 varsFile []byte
18 vars Vars
19)
20
21type Vars struct {
22 openstack_helm.HelmValues `yaml:"_staffeln_helm_values"`
23}
24
25func TestMain(m *testing.M) {
26 t := &testing.T{}
27 err := yaml.UnmarshalWithOptions(varsFile, &vars)
28 require.NoError(t, err)
29
30 code := m.Run()
31 os.Exit(code)
32}
33
34func TestHelmValues(t *testing.T) {
35 vals, err := openstack_helm.CoalescedHelmValues("../../charts/staffeln", &vars.HelmValues)
36 require.NoError(t, err)
37
38 testutils.TestDatabaseConf(t, vals.Conf.Staffeln.Database)
Mohammed Naser60bb74c2025-02-10 10:52:10 -050039 testutils.TestAllPodsHaveRuntimeClass(t, vals)
40 testutils.TestAllPodsHavePriorityClass(t, vals)
Mohammed Naserc6e431b2024-03-15 01:21:44 -040041}