internal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Simple = "simple"
)

To apply a set of labels for a particular test, use the withLables() method. Labels

View Source
const (
	TriageNamespaceName = "nnf-system-needs-triage"
)

Variables

This section is empty.

Functions

func IsSystemInNeedOfTriage

func IsSystemInNeedOfTriage(ctx context.Context, k8sClient client.Client) bool

func IsSystemReserved

func IsSystemReserved(ctx context.Context, k8sClient client.Client) (bool, string, error)

IsSystemReserved checks if the system under test is reserved by a known developer.

func ObjectKeyFromObjectReference

func ObjectKeyFromObjectReference(r corev1.ObjectReference) types.NamespacedName

func SetSystemInNeedOfTriage

func SetSystemInNeedOfTriage(ctx context.Context, k8sClient client.Client) error

func TestIterator

func TestIterator(tests []*T) *iterator

Types

type StateHandler

type StateHandler func(context.Context, client.Client, *dwsv1alpha2.Workflow)

StateHandler defines a method that handles a particular state in the workflow

type T

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

func DuplicateTest

func DuplicateTest(t *T, count int) *T

func MakeTest

func MakeTest(name string, directives ...string) *T

func (*T) AdvanceStateAndWaitForReady

func (t *T) AdvanceStateAndWaitForReady(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha2.Workflow, state dwsv1alpha2.WorkflowState)

func (*T) AndCleanupPersistentInstance

func (t *T) AndCleanupPersistentInstance() *T

AndCleanupPersistentInstance will automatically destroy the persistent instance. It is useful if you have a create_persistent directive that you wish to destroy after the test has finished.

func (*T) Args

func (t *T) Args() []interface{}

func (*T) Cleanup

func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error

Cleanup a test with the programmed test options. Note that the order in which test options are cleanup is the opposite order of their creation to ensure dependencies between options are correct.

func (*T) Execute

func (t *T) Execute(ctx context.Context, k8sClient client.Client)

func (*T) ExpectError

func (t *T) ExpectError(state dwsv1alpha2.WorkflowState) *T

Expect an error at the designed state; Proceed to teardown

func (*T) Focused

func (t *T) Focused() *T

func (*T) Name

func (t *T) Name() string

func (*T) Pending

func (t *T) Pending() *T

func (*T) Prepare

func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error

Prepare a test with the programmed test options.

func (*T) Serialized

func (t *T) Serialized() *T

func (*T) ShouldTeardown

func (t *T) ShouldTeardown() bool

func (*T) StopAfter

func (t *T) StopAfter(state dwsv1alpha2.WorkflowState) *T

Stop after lets you stop a test after a given state is reached

func (*T) WithGlobalLustre

func (t *T) WithGlobalLustre(mountRoot string, fsName string, mgsNids string)

func (*T) WithGlobalLustreFromPersistentLustre

func (t *T) WithGlobalLustreFromPersistentLustre(mountRoot string) *T

WithGlobalLustreFromPersistentLustre will create a global lustre file system from a persistent lustre file system

func (*T) WithLabels

func (t *T) WithLabels(labels ...string) *T

func (*T) WithPermissions

func (t *T) WithPermissions(userId, groupId uint32) *T

func (*T) WithPersistentLustre

func (t *T) WithPersistentLustre(name string) *T

func (*T) WithStorageProfile

func (t *T) WithStorageProfile() *T

WithStorageProfile will manage a storage profile of of name 'name'

func (*T) Workflow

func (t *T) Workflow() *dwsv1alpha2.Workflow

func (*T) WorkflowDirectives

func (t *T) WorkflowDirectives() []string

Retrieve the #DW Directives from the test case

func (*T) WorkflowName

func (t *T) WorkflowName() string

type TCleanupPersistentInstance

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

type TDuplicate

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

type TExpectError

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

type TGlobalLustre

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

type TOptions

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

TOptions let you configure things prior to a test running or during test execution. Nil values represent no configuration of that type.

type TPersistentLustre

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

type TStopAfter

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

type TStorageProfile

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

Jump to

Keyboard shortcuts

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