From e2324cadc3a3cfe49daa46cdd3f8c36e459fd2d6 Mon Sep 17 00:00:00 2001 From: Monika Jakhar Date: Wed, 1 Jul 2026 11:30:05 +0530 Subject: [PATCH] docs(test): add comments to TestAlluxioFileUtils_IsMounted Adds doc comment to TestAlluxioFileUtils_IsMounted in pkg/ddc/alluxio/operations/base_test.go as requested in issue #6015. Signed-off-by: Monika Jakhar --- pkg/ddc/alluxio/operations/base_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/ddc/alluxio/operations/base_test.go b/pkg/ddc/alluxio/operations/base_test.go index 64f8260e582..1871e52fdf1 100644 --- a/pkg/ddc/alluxio/operations/base_test.go +++ b/pkg/ddc/alluxio/operations/base_test.go @@ -345,6 +345,15 @@ func TestAlluxioFIleUtils_Mount(t *testing.T) { } } +// TestAlluxioFileUtils_IsMounted tests the IsMounted method of AlluxioFileUtils. +// It verifies the method's ability to correctly determine whether a given Alluxio +// path is mounted by parsing the output of the underlying alluxio fs mount command. +// +// Test cases: +// - ExecErr: Tests handling of command execution errors, ensuring an error is +// returned when the exec command fails. +// - /spark: Tests a non-existent mount path, expecting false. +// - /hbase: Tests an existing mount path, expecting true. func TestAlluxioFileUtils_IsMounted(t *testing.T) { ExecCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) { return "https://mirrors.bit.edu.cn/apache/hbase/stable on /hbase (web, capacity=-1B, used=-1B, read-only, not shared, properties={}) \n /underFSStorage on / (local, capacity=0B, used=0B, not read-only, not shared, properties={})", "", nil