framework

package
v0.0.1-0...-5dcc44a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenshiftConfigNamespace string = "openshift-config"
)

Variables

This section is empty.

Functions

func CheckCleanEnvironment

func CheckCleanEnvironment(t *testing.T, clientSet *ClientSet)

checkCleanEnvironment checks that all of the resource types that are to be used in this test currently have no items. This ensures that no atifacts from previous test runs are interfering with the current test.

func CleanEnvironment

func CleanEnvironment(t *testing.T, clientSet *ClientSet)

cleanEnvironment is called at the end of the test to ensure that all the resources that were created during the test are removed ahead of the next test starting.

func CreateObjects

func CreateObjects(t *testing.T, clientSet *ClientSet, objs ...runtime.Object)

func NewTestEnv

func NewTestEnv(t *testing.T) *envtest.Environment

Types

type ClientSet

func NewClientSet

func NewClientSet(kubeconfig string) *ClientSet

NewClientSet returns a *ClientBuilder with the given kubeconfig.

func NewClientSetFromConfig

func NewClientSetFromConfig(config *rest.Config) *ClientSet

NewClientSetFromConfig returns a *ClientBuilder with the given rest config.

func (*ClientSet) GetKubeclient

func (cs *ClientSet) GetKubeclient() clientset.Interface

func (*ClientSet) GetKubeconfig

func (cs *ClientSet) GetKubeconfig() (string, error)

func (*ClientSet) GetMcfgclient

func (cs *ClientSet) GetMcfgclient() mcfgclientset.Interface

func (*ClientSet) GetRestConfig

func (cs *ClientSet) GetRestConfig() *rest.Config

Allows the instantiation of additional clients with the same config.

Jump to

Keyboard shortcuts

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