From b374ebd903bee66328ef56d7e196051581c60c97 Mon Sep 17 00:00:00 2001 From: lzk Date: Tue, 28 Apr 2026 15:44:24 +0800 Subject: [PATCH] Add comments to mockExecCommandInContainerForTotalStorageBytes in pkg/ddc/alluxio/ufs_test.go --- pkg/ddc/alluxio/ufs_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/ddc/alluxio/ufs_test.go b/pkg/ddc/alluxio/ufs_test.go index 1dcf732dccb..c8b05276ceb 100644 --- a/pkg/ddc/alluxio/ufs_test.go +++ b/pkg/ddc/alluxio/ufs_test.go @@ -385,6 +385,16 @@ var _ = Describe("AlluxioEngine UFS related tests", func() { }) }) +// mockExecCommandInContainerForTotalStorageBytes mocks command execution output for total storage bytes. +// This helper returns a fixed stdout payload that mimics the "du"-style summary used by tests. +// +// Parameters: +// - none +// +// Returns: +// - stdout (string): Mocked command output including file count, folder count, and folder size. +// - stderr (string): Empty string because this mock simulates successful execution. +// - err (error): Always nil for the success-path test scenario. func mockExecCommandInContainerForTotalStorageBytes() (stdout string, stderr string, err error) { r := `File Count Folder Count Folder Size 50000 1000 6706560319`