environment

package
v0.0.0-...-7d6da81 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunID = uuid.NewUUID()

Functions

func Logf

func Logf(format string, args ...interface{})

Logf logs the info.

func RandomAlphabaticalString

func RandomAlphabaticalString(length int) string

func RandomStringWithCharset

func RandomStringWithCharset(length int, charset string) string

Types

type Environment

type Environment struct {
	BaseName   string
	UniqueName string

	Client        client.Client
	ClientSet     clientset.Interface
	DynamicClient dynamic.Interface

	Namespace *corev1.Namespace
	// contains filtered or unexported fields
}

func NewDefaultEnvironment

func NewDefaultEnvironment(baseName string, options ...Options) *Environment

func NewEnvironment

func NewEnvironment(baseName string, options Options) *Environment

func (Environment) CreateNamespace

func (f Environment) CreateNamespace(baseName string, labels map[string]string) (*corev1.Namespace, error)

func (*Environment) GetManager

func (f *Environment) GetManager() ctrl.Manager

func (Environment) GetNamespace

func (f Environment) GetNamespace() string

func (Environment) GetRootPath

func (f Environment) GetRootPath() string

func (*Environment) InitOnRunningSuite

func (f *Environment) InitOnRunningSuite()

InitOnRunningSuite sets up ginkgo's BeforeEach & AfterEach. It must be called within running ginkgo suite (like Describe, Context etc)

func (*Environment) Start

func (f *Environment) Start()

func (*Environment) TeardownCluster

func (f *Environment) TeardownCluster()

type Options

type Options struct {
	UseManager            bool
	SkipNamespaceCreation bool
	RootPath              string
}

Jump to

Keyboard shortcuts

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