File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
426442func TestGetMasterPod (t * testing.T ) {
427443 type fields struct {
428444 runtime * datav1alpha1.AlluxioRuntime
You can’t perform that action at this time.
0 commit comments