blob: ee4d95bbc2160d703ba71daa12460246bb5fe482 [file] [log] [blame]
Jason Halldea3c672025-02-12 10:33:39 -06001package ovn
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:"_ovn_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/ovn", &vars.HelmValues)
36 require.NoError(t, err)
37
38 testutils.TestAllPodsHaveAntiAffinityType(t, vals)
39}