Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkg/ddc/alluxio/load_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,21 @@ func Test_genDataLoadValue(t *testing.T) {
}
}

// TestCheckRuntimeReady tests the CheckRuntimeReady function of the AlluxioEngine.
// This function verifies whether the Alluxio runtime is ready by mocking the execution of container commands.
// It uses two mock functions:
// 1. mockExecCommon: Simulates a successful command execution.
// 2. mockExecErr: Simulates a failed command execution.
//
// The test cases include:
// 1. A successful runtime check, where the function should return true.
// 2. A failed runtime check, where the function should return false.
//
// Parameters:
// - t (*testing.T): The testing context for logging and error reporting.
//
// Returns:
// - None. The function asserts the expected results and fails the test if the conditions are not met.
func TestCheckRuntimeReady(t *testing.T) {
mockExecCommon := func(ctx context.Context, podName string, containerName string, namespace string, cmd []string) (stdout string, stderr string, e error) {
return "", "", nil
Expand Down
Loading