From 7c6112c5c7b4812c418fde6c4fe33ddf4a40fe0a Mon Sep 17 00:00:00 2001 From: Blueroaring Date: Mon, 11 May 2026 11:29:44 +0800 Subject: [PATCH] Add Notation to TestAlluxioFIleUtils_MKdir in fluid/pkg/ddc/alluxio/operations/base_tast.go. Signed-off-by: Blueroaring --- pkg/ddc/alluxio/operations/base_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ddc/alluxio/operations/base_test.go b/pkg/ddc/alluxio/operations/base_test.go index 28382e9f271..cec29c52d3e 100644 --- a/pkg/ddc/alluxio/operations/base_test.go +++ b/pkg/ddc/alluxio/operations/base_test.go @@ -236,6 +236,9 @@ func TestAlluxioFileUtils_QueryMetaDataInfoIntoFile(t *testing.T) { } } +// TestAlluxioFIleUtils_MKdir verifies AlluxioFileUtils.Mkdir by stubbing the private exec method with gomonkey: +// when exec returns an error, Mkdir should return a non-nil error; when exec succeeds, Mkdir should return nil. +// patches.Reset in defer restores the original behavior after the test. func TestAlluxioFIleUtils_MKdir(t *testing.T) { ExecCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) { return "alluxio mkdir success", "", nil