internal

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Simple         = "simple"
	ExternalLustre = "external_lustre"
)

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 CleanupHelperPods added in v0.0.4

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

func CurrentContext added in v0.0.4

func CurrentContext() (string, error)

func GetSystemConfiguraton added in v0.0.4

func GetSystemConfiguraton(ctx context.Context, k8sClient client.Client) *dwsv1alpha2.SystemConfiguration

func GetVersion added in v0.0.4

func GetVersion() (string, error)

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 SetupCopyIn added in v0.0.4

func SetupCopyIn(ctx context.Context, k8sClient client.Client, t *T, o TOptions)

Start up a pod that accesses the global lustre filesystem and creates a file in the location specified by the copy_in directive.

func TestIterator

func TestIterator(tests []*T) *iterator

func VerifyCopyOut added in v0.0.4

func VerifyCopyOut(ctx context.Context, k8sClient client.Client, t *T, o TOptions)

Start up a pod that accesses the global lustre filesystem and verifies that the files specified by the copy_in and copy_out directives match.

func WaitForDeletion added in v0.0.4

func WaitForDeletion(ctx context.Context, k8sClient client.Client, obj client.Object)

Types

type ContainerProfileOptions added in v0.0.2

type ContainerProfileOptions struct {
	PrerunTimeoutSeconds  *int
	PostrunTimeoutSeconds *int
	RetryLimit            *int
	NoStorage             bool // make any storages in the profile optional
}

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) HardwareRequired added in v0.0.4

func (t *T) HardwareRequired() *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) WithContainerProfile added in v0.0.2

func (t *T) WithContainerProfile(base string, options *ContainerProfileOptions) *T

func (*T) WithExternalComputes added in v0.0.7

func (t *T) WithExternalComputes() *T

WithExternalComputes engages external computes for the the test.

func (*T) WithGlobalLustre

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

func (*T) WithGlobalLustreFromPersistentLustre

func (t *T) WithGlobalLustreFromPersistentLustre(name string, namespaces []string) *T

WithGlobalLustreFromPersistentLustre will create a global lustre file system from a persistent lustre file system namespaces can be added in addition to the default `nnf-dm-system`

func (*T) WithLabels

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

func (*T) WithMgsPool added in v0.0.2

func (t *T) WithMgsPool(name string, count int) *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) WithStorageProfileExternalMGS added in v0.0.2

func (t *T) WithStorageProfileExternalMGS(externalMGS string) *T

func (*T) WithStorageProfileStandaloneMGT added in v0.0.2

func (t *T) WithStorageProfileStandaloneMGT(standaloneMGT string) *T

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 TContainerProfile added in v0.0.2

type TContainerProfile 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 TMgsPool added in v0.0.2

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

type TOptions

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

TOptions lets 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