Skip to content

Commit 848dfe9

Browse files
FairyBingFairyBing
andauthored
This PR is to add comments to TestTotalStorageBytes in pkg\ddc\alluxio\ufs_test.go. (#4693)
* Add comments to TestTotalStorageBytes in pkg\ddc\alluxio\ufs_test.go Signed-off-by: FairyBing <221220081@nju.edu.cn> * Add comments to TestTotalStorageBytes in pkg\ddc\alluxio\ufs_test.go Signed-off-by: FairyBing <221220081@nju.edu.cn> --------- Signed-off-by: FairyBing <221220081@nju.edu.cn> Co-authored-by: FairyBing <221220081@nju.edu.cn>
1 parent 4909edc commit 848dfe9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/ddc/alluxio/ufs_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ func TestFreeStorageBytes(t *testing.T) {
112112
}
113113
}
114114

115+
// TestTotalStorageBytes verifies the functionality of AlluxioEngine's TotalStorageBytes method.
116+
// It validates whether the method correctly calculates total storage capacity by:
117+
// - Mocking AlluxioRuntime configuration and container command execution
118+
// - Testing both normal scenarios (expected values) and error conditions
119+
// - Using patched container command output to ensure predictable test results
120+
// Each test case checks if returned values match expectations and errors are properly handled.
115121
func TestTotalStorageBytes(t *testing.T) {
116122
type fields struct {
117123
runtime *datav1alpha1.AlluxioRuntime

0 commit comments

Comments
 (0)