Documentation
¶
Index ¶
- Constants
- Variables
- func CleanupHelperPods(ctx context.Context, k8sClient client.Client, t *T)
- func CurrentContext() (string, error)
- func GetSystemConfiguraton(ctx context.Context, k8sClient client.Client) *dwsv1alpha7.SystemConfiguration
- func GetVersion() (string, error)
- func IsSystemInNeedOfTriage(ctx context.Context, k8sClient client.Client) bool
- func IsSystemReserved(ctx context.Context, k8sClient client.Client) (bool, string, error)
- func ObjectKeyFromObjectReference(r corev1.ObjectReference) types.NamespacedName
- func ReportContainerPodLogs(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow) string
- func SetSystemInNeedOfTriage(ctx context.Context, k8sClient client.Client) error
- func SetupCopyIn(ctx context.Context, k8sClient client.Client, t *T, o TOptions)
- func TestIterator(tests []*T) *iterator
- func VerifyContainerPodLogs(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow)
- func VerifyCopyOut(ctx context.Context, k8sClient client.Client, t *T, o TOptions)
- func VerifyUserOnRabbit(ctx context.Context, k8sClient client.Client, uid uint32)
- func WaitForDeletion(ctx context.Context, k8sClient client.Client, obj client.Object)
- type ContainerProfileOptions
- type StateHandler
- type T
- func (t *T) AdvanceStateAndWaitForReady(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow, ...)
- func (t *T) AndCleanupPersistentInstance() *T
- func (t *T) Args() []interface{}
- func (t *T) Cleanup(ctx context.Context, k8sClient client.Client) error
- func (t *T) DelayInState(state dwsv1alpha7.WorkflowState, duration time.Duration) *T
- func (t *T) Execute(ctx context.Context, k8sClient client.Client)
- func (t *T) ExpectError(state dwsv1alpha7.WorkflowState) *T
- func (t *T) Focused() *T
- func (t *T) HardwareRequired() *T
- func (t *T) HasContainerDirective() bool
- func (t *T) Name() string
- func (t *T) Pending() *T
- func (t *T) Prepare(ctx context.Context, k8sClient client.Client) error
- func (t *T) RequiresHardware() *T
- func (t *T) Serialized() *T
- func (t *T) ShouldTeardown() bool
- func (t *T) StopAfter(state dwsv1alpha7.WorkflowState) *T
- func (t *T) WithContainerProfile(base string, options *ContainerProfileOptions) *T
- func (t *T) WithExternalComputes() *T
- func (t *T) WithGlobalLustre(mountRoot string, fsName string, mgsNids string)
- func (t *T) WithGlobalLustreFromPersistentLustre(name string, namespaces []string) *T
- func (t *T) WithLabels(labels ...string) *T
- func (t *T) WithMgsPool(name string, count int) *T
- func (t *T) WithPermissions(userId, groupId uint32) *T
- func (t *T) WithPersistentLustre(name string) *T
- func (t *T) WithStorageProfile() *T
- func (t *T) WithStorageProfileExternalMGS(externalMGS string) *T
- func (t *T) WithStorageProfileExternalMGSFromPersistentLustre() *T
- func (t *T) WithStorageProfileLvCreate(lvCreateCmd string) *T
- func (t *T) WithStorageProfileStandaloneMGT(standaloneMGT string) *T
- func (t *T) Workflow() *dwsv1alpha7.Workflow
- func (t *T) WorkflowDirectives() []string
- func (t *T) WorkflowName() string
- type TCleanupPersistentInstance
- type TContainerProfile
- type TDelayInState
- type TDuplicate
- type TExpectError
- type TGlobalLustre
- type TMgsPool
- type TOptions
- type TPersistentLustre
- type TStopAfter
- type TStorageProfile
Constants ¶
const ( Simple = "simple" ExternalLustre = "external_lustre" GFS2Fence = "gfs2_fence" )
To apply a set of labels for a particular test, use the withLables() method. Labels
const (
TriageNamespaceName = "nnf-system-needs-triage"
)
Variables ¶
var ( // TestUserID and TestGroupID are the UID/GID used for workflow permissions in // container and data movement tests. These must correspond to a real user on the // system's compute/Rabbit nodes so that MPI SSH authentication is properly exercised. // Defaults to the flux user (1051/1052) since that is the WLM user that submits // MPI jobs in production. Using the mpiuser account (1050) would bypass the SSH key // setup code path where issue #310 occurs. // Override via NNF_USER_ID and NNF_GROUP_ID environment variables. TestUserID uint32 = 1051 TestGroupID uint32 = 1052 )
Functions ¶
func CleanupHelperPods ¶ added in v0.0.4
func CurrentContext ¶ added in v0.0.4
func GetSystemConfiguraton ¶ added in v0.0.4
func GetSystemConfiguraton(ctx context.Context, k8sClient client.Client) *dwsv1alpha7.SystemConfiguration
func GetVersion ¶ added in v0.0.4
func IsSystemInNeedOfTriage ¶
func IsSystemReserved ¶
IsSystemReserved checks if the system under test is reserved by a known developer.
func ObjectKeyFromObjectReference ¶
func ObjectKeyFromObjectReference(r corev1.ObjectReference) types.NamespacedName
func ReportContainerPodLogs ¶ added in v0.1.24
func ReportContainerPodLogs(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow) string
ReportContainerPodLogs collects container pod logs for a workflow and returns them as a formatted string for inclusion in test failure reports.
func SetSystemInNeedOfTriage ¶
func SetupCopyIn ¶ added in v0.0.4
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 VerifyContainerPodLogs ¶ added in v0.1.24
func VerifyContainerPodLogs(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow)
VerifyContainerPodLogs finds container pods for the given workflow and verifies their logs don't contain SSH authentication errors that indicate MPI communication failures. This catches issues like NearNodeFlash/NearNodeFlash.github.io#310 where mpirun fails with "Permission denied" when SSHing to worker nodes.
func VerifyCopyOut ¶ added in v0.0.4
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 VerifyUserOnRabbit ¶ added in v0.1.24
VerifyUserOnRabbit creates a pod on a Rabbit node to verify that the given UID corresponds to a real user. This is important for MPI container tests: if the user doesn't exist on the system, SSH key setup follows a different code path and won't exercise the authentication flow that caused issue #310. Checks all Rabbit nodes in the system configuration.
Types ¶
type ContainerProfileOptions ¶ added in v0.0.2
type StateHandler ¶
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 (*T) AdvanceStateAndWaitForReady ¶
func (t *T) AdvanceStateAndWaitForReady(ctx context.Context, k8sClient client.Client, workflow *dwsv1alpha7.Workflow, state dwsv1alpha7.WorkflowState)
func (*T) AndCleanupPersistentInstance ¶
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) Cleanup ¶
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) DelayInState ¶ added in v0.1.21
func (t *T) DelayInState(state dwsv1alpha7.WorkflowState, duration time.Duration) *T
DelayInState allows you to pause in a specific state for a given duration. Multiple delays can be added by calling this method multiple times.
func (*T) ExpectError ¶
func (t *T) ExpectError(state dwsv1alpha7.WorkflowState) *T
Expect an error at the designed state; Proceed to teardown
func (*T) HardwareRequired ¶ added in v0.0.4
func (*T) HasContainerDirective ¶ added in v0.1.24
HasContainerDirective returns true if this test includes a #DW container directive.
func (*T) RequiresHardware ¶ added in v0.1.26
RequiresHardware marks a test as requiring real hardware (skipped in kind environments).
func (*T) Serialized ¶
func (*T) ShouldTeardown ¶
func (*T) StopAfter ¶
func (t *T) StopAfter(state dwsv1alpha7.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
WithExternalComputes engages external computes for the the test.
func (*T) WithGlobalLustre ¶
func (*T) WithGlobalLustreFromPersistentLustre ¶
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) WithPermissions ¶
func (*T) WithPersistentLustre ¶
func (*T) WithStorageProfile ¶
WithStorageProfile will manage a storage profile of name 'name'
func (*T) WithStorageProfileExternalMGS ¶ added in v0.0.2
func (*T) WithStorageProfileExternalMGSFromPersistentLustre ¶ added in v0.1.23
WithStorageProfileExternalMGSFromPersistentLustre configures the storage profile to use the NID from the test's persistent lustre instance as the external MGS. The profile is created after the persistent lustre is provisioned so the NID is available.
func (*T) WithStorageProfileLvCreate ¶ added in v0.1.21
func (*T) WithStorageProfileStandaloneMGT ¶ added in v0.0.2
func (*T) Workflow ¶
func (t *T) Workflow() *dwsv1alpha7.Workflow
func (*T) WorkflowDirectives ¶
Retrieve the #DW Directives from the test case
func (*T) WorkflowName ¶
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 TDelayInState ¶ added in v0.1.21
type TDelayInState 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 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
}