Skip to content

Commit 7a5430d

Browse files
authored
Add notation to TestUpdateDatasetStatus in pkg\ddc\juicefs\dataset_test.go
1 parent 8a89517 commit 7a5430d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/ddc/juicefs/dataset_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ func TestUpdateCacheOfDataset(t *testing.T) {
101101
}
102102
}
103103

104+
// TestUpdateDatasetStatus is a test function that verifies the behavior of the UpdateDatasetStatus method in the JuiceFSEngine.
105+
// It tests the function with different dataset phases (Bound, Failed, None) and ensures that the dataset status is updated correctly.
106+
// The function creates a fake client with test datasets and runtime objects, then calls UpdateDatasetStatus with each phase.
107+
// It checks if the dataset status matches the expected result after each update.
108+
// If any of the checks fail, the test will report an error.
104109
func TestUpdateDatasetStatus(t *testing.T) {
105110
testDatasetInputs := []*datav1alpha1.Dataset{
106111
{

0 commit comments

Comments
 (0)