Skip to content

Commit 1a7957d

Browse files
authored
This PR is to add comments to TestShouldSetupMaster in pkg/ddc/alluxio/master_test.go. (#4597)
* Add comments to TestShouldSetupMaster in pkg/ddc/alluxio/master_test.go. Signed-off-by: ubuntu20 <2042287853@qq.com> * Add comments to TestShouldSetupMaster in pkg/ddc/alluxio/master_test.go. Signed-off-by: ubuntu20 <2042287853@qq.com> --------- Signed-off-by: ubuntu20 <2042287853@qq.com>
1 parent ed6e97f commit 1a7957d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkg/ddc/alluxio/master_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ func TestCheckMasterReady(t *testing.T) {
164164
}
165165
}
166166

167+
// TestShouldSetupMaster tests the ShouldSetupMaster function of AlluxioEngine.
168+
// Functionality: Verifies if the Alluxio master should be set up based on runtime status.
169+
// Parameters:
170+
// - t *testing.T: Standard testing object for test reporting and logging.
171+
// Return: None (testing function).
172+
// Notes:
173+
// - Uses fake client to simulate interactions with Kubernetes API.
174+
// - Tests two scenarios:
175+
// 1. Runtime with MasterPhase "NotReady" should return false.
176+
// 2. Runtime with MasterPhase "None" should return true.
177+
// - Fails the test if actual results mismatch expectations.
167178
func TestShouldSetupMaster(t *testing.T) {
168179
alluxioruntimeInputs := []datav1alpha1.AlluxioRuntime{
169180
{

0 commit comments

Comments
 (0)