fixtures

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/* resource names */
	Namespace       = "numaplane-system"
	TargetNamespace = "numaplane-e2e"
	E2ELabel        = "numaplane-e2e"
	E2ELabelValue   = "true"
)

Variables

This section is empty.

Functions

func PodPortForward

func PodPortForward(config *rest.Config, namespace, podName string,
	localPort, remotePort int, stopCh <-chan struct{}) error

func TrimRepoUrl

func TrimRepoUrl(repoUrl string) string

TODO: extend to trim URLs for ssh/https

Types

type E2ESuite

type E2ESuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*E2ESuite) AfterTest

func (s *E2ESuite) AfterTest(suiteName, testName string)

func (*E2ESuite) BeforeTest

func (s *E2ESuite) BeforeTest(suiteName, testName string)

func (*E2ESuite) CheckError

func (s *E2ESuite) CheckError(err error)

func (*E2ESuite) Given

func (s *E2ESuite) Given() *Given

func (*E2ESuite) SetupSuite

func (s *E2ESuite) SetupSuite()

func (*E2ESuite) TearDownSuite

func (s *E2ESuite) TearDownSuite()

type Expect

type Expect struct {
	// contains filtered or unexported fields
}

func (*Expect) CheckCommitStatus

func (e *Expect) CheckCommitStatus() *Expect

verify that GitSync's commitStatus is as expected: synced = true hash is equal to the last commit to the Git server

func (*Expect) ResourcesDontExist

func (e *Expect) ResourcesDontExist(apiVersion, resourceType string, resources []string) *Expect

check that resources have been deleted or never existed

func (*Expect) ResourcesExist

func (e *Expect) ResourcesExist(apiVersion, resourceType string, resources []string) *Expect

check that resources are created or exists

func (*Expect) VerifyResourceState

func (e *Expect) VerifyResourceState(apiVersion, resourceType, resource, field, key string, value interface{}) *Expect

verify value of resource spec to determine if field is set TODO: this method currently only handles fields that are 2 levels down from root (i.e. "field.key"), and should be modified to support keys at any level, like: - "spec.metadata.labels.instance" - "spec.template.containers[0].name"

func (*Expect) When

func (e *Expect) When() *When

type Given

type Given struct {
	// contains filtered or unexported fields
}

func (*Given) GitSync

func (g *Given) GitSync(text string) *Given

create GitSync using raw YAML or @filename

func (*Given) InitializeGitRepo

func (g *Given) InitializeGitRepo(directory string) *Given

initializes Git repo specified by GitSync's RepoURL by pushing initial commit files these files should be located at testdata/<directory> directory name does not need to match gitSync.Spec.Path

func (*Given) When

func (g *Given) When() *When

func (*Given) WithGitSync

func (g *Given) WithGitSync(gs *v1alpha1.GitSync) *Given

type When

type When struct {
	// contains filtered or unexported fields
}

func (*When) CreateGitSyncAndWait

func (w *When) CreateGitSyncAndWait() *When

create new GitSync

func (*When) DeleteGitSyncAndWait

func (w *When) DeleteGitSyncAndWait() *When

delete existing GitSync

func (*When) Expect

func (w *When) Expect() *Expect

func (*When) Given

func (w *When) Given() *Given

func (*When) ModifyResource

func (w *When) ModifyResource(apiVersion, resourceType, resource, patch string) *When

kubectl apply resource for self healing test

func (*When) PushToGitRepo

func (w *When) PushToGitRepo(directory string, fileNames []string, remove bool) *When

make git push to Git server pod

func (*When) UpdateGitSyncAndWait

func (w *When) UpdateGitSyncAndWait() *When

update existing GitSync

func (*When) Wait

func (w *When) Wait(timeout time.Duration) *When

Jump to

Keyboard shortcuts

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