common

package
v0.0.0-...-a7b7215 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: UPL-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TEST_HELM_MODULE_FILE is the name of manifest file containing CR for helm module.
	TEST_HELM_MODULE_FILE = "vz_test_module.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010 = "vz_test_module_overrides_010.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010_1 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_1 = "vz_test_module_overrides_010_1.yaml"
	// TEST_HELM_MODULE_OVERRIDE_011 is the name of manifest file containing a overrides for 0.1.1 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_011 = "vz_test_module_overrides_011.yaml"
	// TEST_HELM_MODULE_VERSION_011 is the version for helm module 0.1.1.
	TEST_HELM_MODULE_VERSION_011 = "0.1.1"
	// DEFAULT_NS is default namespace.
	DEFAULT_NS = "default"
	// TEST_HELM_MODULE_OVERRIDE_010_2 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_2 = "vz_test_module_overrides_010_2.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010_3 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_3 = "vz_test_module_overrides_010_3.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010_4 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_4 = "vz_test_module_overrides_010_4.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010_5 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_5 = "vz_test_module_overrides_010_5.yaml"
	// TEST_HELM_MODULE_OVERRIDE_010_6 is the name of manifest file containing a overrides for 0.1.0 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_010_6 = "vz_test_module_overrides_010_6.yaml"
	// TEST_HELM_MODULE_OVERRIDE_011_1 is the name of manifest file containing a overrides for 0.1.1 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_011_1 = "vz_test_module_overrides_011_1.yaml"
	// TEST_HELM_MODULE_OVERRIDE_011_2 is the name of manifest file containing a overrides for 0.1.1 version of helm module.
	TEST_HELM_MODULE_OVERRIDE_011_2 = "vz_test_module_overrides_011_2.yaml"
)

Variables

This section is empty.

Functions

func GetRandomNamespace

func GetRandomNamespace(length int) string

GetRandomNamespace generates a random namespace name of given length.

func LoadTestFile

func LoadTestFile(filePath string) ([]byte, error)

LoadTestFile reads a testdata file.

func UnmarshalTestFile

func UnmarshalTestFile(filePath string, element interface{}) error

UnmarshalTestFile unmarshalls a testdata file to a go object.

Types

type TestContext

type TestContext struct {
	T           *testing.T
	GomegaWithT *gomega.WithT
	// contains filtered or unexported fields
}

TestContext contains the reference to testing.T for current test state, k8s clients and gomega instance specific to running test.

func NewTestContext

func NewTestContext(t *testing.T) *TestContext

NewTestContext creates a new TestContext.

func (*TestContext) Client

func (ctx *TestContext) Client() *kubernetes.Clientset

Client returns the generic k8s client.

func (*TestContext) CoreV1Client

func (ctx *TestContext) CoreV1Client() v1.CoreV1Interface

CoreV1Client returns the k8s client for corev1 resources.

func (*TestContext) ModuleClient

func (ctx *TestContext) ModuleClient() *v1alpha1.PlatformV1alpha1Client

ModuleClient returns the k8s client for Modules.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL