Skip to content

Commit 2e79364

Browse files
committed
modify1
1 parent 59b3713 commit 2e79364

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/ddc/alluxio/metadata_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,16 @@ func TestShouldSyncMetadata(t *testing.T) {
502502
}
503503
}
504504

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

0 commit comments

Comments
 (0)