Skip to content

Commit fda8ac6

Browse files
authored
This PR is to add comments to TestAlluxioFIleUtils_Du in fluid/pkg/ddc/alluxio/operations/base_test.go. (#6020)
* Add comments to TestAlluxioFIleUtils_Du in fluid/pkg/ddc/alluxio/operations/base_test.go. Signed-off-by: Ksmille <2686097155@qq.com> * Refine comments for TestAlluxioFIleUtils_Du in fluid/pkg/ddc/alluxio/operations/base_test.go. Signed-off-by: Ksmille <2686097155@qq.com> --------- Signed-off-by: Ksmille <2686097155@qq.com>
1 parent 9c0dc17 commit fda8ac6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pkg/ddc/alluxio/operations/base_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,14 @@ func TestAlluxioFileUtils_Ready(t *testing.T) {
479479
}
480480
}
481481

482+
// TestAlluxioFIleUtils_Du tests the Du method of AlluxioFileUtils.
483+
// It verifies that the method returns an error when command execution fails
484+
// and correctly parses the file size, cached size, and cached percentage
485+
// when the command succeeds.
486+
//
487+
// Test cases:
488+
// - command execution returns an error
489+
// - command execution succeeds and du output is parsed correctly
482490
func TestAlluxioFIleUtils_Du(t *testing.T) {
483491
ExecCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) {
484492
return "File Size In Alluxio Path\n577575561 0 (0%) /hbase", "", nil

0 commit comments

Comments
 (0)