scenario

package
v0.0.0-...-2ed9603 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExistTimeout - time in which object should exist after creation;
	ExistTimeout = 1 * time.Minute
	// InstantTimeout - time used to check properties that should already apply.
	// It isn't 0 to give checks time to run.
	InstantTimeout = 2 * time.Second
	// ReadyTimeout - time after creation that object should be available;
	ReadyTimeout = 4 * time.Minute
	// Composition Reconcile - bound on time
	CompositionReconcileTimeout = 4 * time.Minute
	// DeleteTimeout time to delete
	DeleteTimeout = 2 * time.Minute
	// OutputExistsTimeout - time in which output objects exist after reconcile
	OutputExistsTimeout = CompositionReconcileTimeout
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sample

type Sample struct {
	Name        string
	Composition string
}

type Scenario

type Scenario struct {
	T *testing.T
	C *testclient.Client
	// contains filtered or unexported fields
}

Scenario - context for each scenario

func NewBasic

func NewBasic(t *testing.T) *Scenario

NewBasic - return a Scenario object for Basic testcases

  • Use ../../tests/data/Test<name> for data
  • Expect input.yaml, output.yaml (optional)
  • Dont need KCC enabled for tests

func NewFromSample

func NewFromSample(t *testing.T, sample Sample, dependentSamples []Sample, hasCloudRsrc bool) *Scenario

NewFromSample - return a Scenario object for testing Samples/

func (*Scenario) Apply

func (s *Scenario) Apply(name string, objects []*unstructured.Unstructured)

func (*Scenario) ApplyInput

func (s *Scenario) ApplyInput()

func (*Scenario) ApplyManifests

func (s *Scenario) ApplyManifests(name string, path ...string)

func (*Scenario) Cleanup

func (s *Scenario) Cleanup()

func (*Scenario) CleanupInput

func (s *Scenario) CleanupInput()

func (*Scenario) CleanupIntermediateManifests

func (s *Scenario) CleanupIntermediateManifests()

func (*Scenario) CleanupOutput

func (s *Scenario) CleanupOutput()

func (*Scenario) GatherLogs

func (s *Scenario) GatherLogs()

GatherLogs - grab the logs for the test case

func (*Scenario) GetName

func (s *Scenario) GetName() string

GetName - return name

func (*Scenario) Setup

func (s *Scenario) Setup()

func (*Scenario) Verify

func (s *Scenario) Verify(name string, matchSpec bool, objects []*unstructured.Unstructured)

func (*Scenario) VerifyInput

func (s *Scenario) VerifyInput()

func (*Scenario) VerifyManifests

func (s *Scenario) VerifyManifests(name string, matchSpec bool, path ...string)

func (*Scenario) VerifyOutputExists

func (s *Scenario) VerifyOutputExists()

func (*Scenario) VerifyOutputSpecMatches

func (s *Scenario) VerifyOutputSpecMatches()

Jump to

Keyboard shortcuts

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