Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/ddc/alluxio/operations/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,10 @@ func TestAlluxioFIleUtils_ReportCapacity(t *testing.T) {
}
}

// TestAlluxioFileUtils_exec tests the private exec method of AlluxioFileUtils.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small wording nit on the new doc comment: the test calls exec(..., false) only on the error path and exec(..., true) only on the success path, and there are no assertions tied to the verbose flag itself (e.g. on log output). Saying it "covers calls with both disabled and enabled verbose output" reads a bit stronger than what is actually verified. Something like "exercises the method with both verbose=false and verbose=true" would line up more precisely with the assertions and avoid suggesting the verbose behaviour is independently checked.

// It mocks the exec implementation to verify that an error is returned when
// command execution fails and that no error is returned when execution succeeds.
// The test also covers calls with both disabled and enabled verbose output.
func TestAlluxioFileUtils_exec(t *testing.T) {
ExecWithoutTimeoutCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) {
return "Type: COUNTER, Value: 6,367,897", "", nil
Expand Down
Loading