Skip to content
Open
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
11 changes: 11 additions & 0 deletions pkg/ddc/alluxio/ufs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,17 @@ func mockExecCommandInContainerForTotalStorageBytes() (stdout string, stderr str
return r, "", nil
}

// mockExecCommandInContainerForTotalFileNums mocks command execution output for total file count.
// This helper returns a fixed stdout payload that mimics Alluxio Master metrics output
// used by TotalFileNums() unit tests.
//
// Parameters:
// - none
//
// Returns:
// - stdout (string): Mocked metrics line containing Master.FilesCompleted counter value.
// - stderr (string): Empty string because this mock simulates successful execution.
// - err (error): Always nil for the success-path test scenario.
func mockExecCommandInContainerForTotalFileNums() (stdout string, stderr string, err error) {
r := `Master.FilesCompleted (Type: COUNTER, Value: 1,331,167)`
return r, "", nil
Expand Down
Loading