From 88f1e9a5f8333ccb0edc34eac56ea64709bdd745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=96=87=E5=8D=9A?= <231220141@smail.nju.edu.cn> Date: Wed, 17 Jun 2026 00:01:15 +0800 Subject: [PATCH] Add comments/notation to TestAlluxioFileUtils_FindUnmountedAlluxioPaths in pkg/ddc/alluxio/operations/base_test.go. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 金文博 <231220141@smail.nju.edu.cn> --- pkg/ddc/alluxio/operations/base_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/ddc/alluxio/operations/base_test.go b/pkg/ddc/alluxio/operations/base_test.go index b90594e32cd..dc1b3c3f69b 100644 --- a/pkg/ddc/alluxio/operations/base_test.go +++ b/pkg/ddc/alluxio/operations/base_test.go @@ -391,6 +391,19 @@ func TestAlluxioFileUtils_IsMounted(t *testing.T) { } } +// TestAlluxioFileUtils_FindUnmountedAlluxioPaths tests the FindUnmountedAlluxioPaths method +// of AlluxioFileUtils. It mocks the internal exec command to simulate the output of +// `alluxio fs mount` and verifies that paths not currently mounted are correctly +// identified from the given alluxioPaths slice. +// +// Test cases cover: +// - all provided paths are already mounted (expect empty result) +// - a mix of mounted and unmounted paths (expect only unmounted ones) +// - an empty input slice (expect empty result) +// - all provided paths are unmounted (expect all paths returned) +// +// Parameters: +// - t (*testing.T): the test context used for reporting failures. func TestAlluxioFileUtils_FindUnmountedAlluxioPaths(t *testing.T) { const returnMessage = `s3://bucket/path/train on /cache (s3, capacity=-1B, used=-1B, not read-only, not shared, properties={alluxio.underfs.s3.inherit.acl=false, alluxio.underfs.s3.endpoint=s3endpoint, aws.secretKey=, aws.accessKeyId=}) /underFSStorage on / (local, capacity=0B, used=0B, not read-only, not shared, properties={})`