From 7b57088beba5b9bff5fb960ae39119b86c72233e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E6=A1=90?= <231220169@smail.nju.edu.cn> Date: Tue, 30 Jun 2026 02:02:29 +0800 Subject: [PATCH] Add comments/notation to mockExecCommandInContainerForTotalFileNums in pkg/ddc/alluxio/ufs_test.go. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 雷桐 <231220169@smail.nju.edu.cn> --- pkg/ddc/alluxio/ufs_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/ddc/alluxio/ufs_test.go b/pkg/ddc/alluxio/ufs_test.go index c8b05276ceb..9a252986290 100644 --- a/pkg/ddc/alluxio/ufs_test.go +++ b/pkg/ddc/alluxio/ufs_test.go @@ -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