Skip to content

Commit 8c42562

Browse files
1870652397221220148@smail.nju.edu.cn
andauthored
Add Notation to UpdateDatasetStatus in pkj/ddc/alluxio/utils_test.go. (#4683)
Signed-off-by: 221220148@smail.nju.edu.cn <221220148@smail.nju.edu.cn> Co-authored-by: 221220148@smail.nju.edu.cn <221220148@smail.nju.edu.cn>
1 parent e3b13c8 commit 8c42562

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

pkg/ddc/alluxio/utils_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,22 @@ func TestGetRuntime(t *testing.T) {
423423
}
424424
}
425425

426+
// TestGetMasterPod verifies the correct retrieval of the master Pod for an Alluxio runtime.
427+
// This test validates whether the AlluxioEngine's getMasterPod method accurately fetches
428+
// the expected Pod resource from Kubernetes based on the provided runtime configuration.
429+
//
430+
// Test Cases:
431+
// - Standard scenario: Checks if the master Pod is correctly retrieved when valid runtime metadata is provided.
432+
//
433+
// Parameters:
434+
// - t *testing.T: Testing framework handle for assertion and logging
435+
//
436+
// Test Logic:
437+
// 1. Defines test structures with mock AlluxioRuntime configurations and expected Pod results
438+
// 2. Initializes a fake Kubernetes client with test-specific schemas and objects
439+
// 3. Executes getMasterPod with different test configurations
440+
// 4. Compares actual results against expected outcomes using deep equality checks
441+
// 5. Reports discrepancies between actual and expected results through testing.T
426442
func TestGetMasterPod(t *testing.T) {
427443
type fields struct {
428444
runtime *datav1alpha1.AlluxioRuntime

0 commit comments

Comments
 (0)