Skip to content

Commit 73aae73

Browse files
authored
Add comments to TestShouldRestoreMetadata in pkg\ddc\alluxio\metadata_test.go (#4659)
* modify1 Signed-off-by: wanghaoran <1948735040@qq.com> * Modify comments of TestShouldRestoreMetadata in pkg\ddc\alluxio\metadata_test.go Signed-off-by: wanghaoran <1948735040@qq.com> --------- Signed-off-by: wanghaoran <1948735040@qq.com>
1 parent 404885a commit 73aae73

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/ddc/alluxio/metadata_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,14 @@ func TestShouldSyncMetadata(t *testing.T) {
510510
}
511511
}
512512

513+
// TestShouldRestoreMetadata tests the shouldRestoreMetadata function of the AlluxioEngine.
514+
// It creates a set of test datasets and initializes a fake client with these datasets.
515+
// Then, it creates two AlluxioEngine instances with different configurations and checks
516+
// if the shouldRestoreMetadata function returns the expected results for each instance.
517+
// The test cases include:
518+
// - An engine with a dataset that has a DataRestoreLocation specified, expecting shouldRestoreMetadata to return true.
519+
// - An engine with a dataset that does not have a DataRestoreLocation specified, expecting shouldRestoreMetadata to return false.
520+
// If the function does not return the expected result or an error occurs, the test will fail.
513521
func TestShouldRestoreMetadata(t *testing.T) {
514522
datasetInputs := []datav1alpha1.Dataset{
515523
{

0 commit comments

Comments
 (0)