@@ -15,7 +15,7 @@ def test_generate_pod_deployment_mutation(self):
1515 # Test GPU pod deployment
1616 gpu_result = pods .generate_pod_deployment_mutation (
1717 name = "test" ,
18- image_name = "test_image" ,
18+ image_name = "test_image" ,
1919 gpu_type_id = "1" ,
2020 cloud_type = "cloud" ,
2121 data_center_id = "1" ,
@@ -34,6 +34,15 @@ def test_generate_pod_deployment_mutation(self):
3434 allowed_cuda_versions = ["11.8" , "12.0" ],
3535 )
3636
37+ # Test GPU pod deployment with container registry auth
38+ gpu_result_with_auth = pods .generate_pod_deployment_mutation (
39+ name = "test" ,
40+ image_name = "test_image" ,
41+ gpu_type_id = "1" ,
42+ cloud_type = "ALL" ,
43+ container_registry_auth_id = "auth123" ,
44+ )
45+
3746 # Test CPU pod deployment
3847 cpu_result = pods .generate_pod_deployment_mutation (
3948 name = "test-cpu" ,
@@ -55,10 +64,16 @@ def test_generate_pod_deployment_mutation(self):
5564 # Check GPU pod mutation structure
5665 self .assertIn ("mutation" , gpu_result )
5766 self .assertIn ("podFindAndDeployOnDemand" , gpu_result )
58-
59- # Check CPU pod mutation structure
67+ self .assertNotIn ("containerRegistryAuthId" , gpu_result )
68+
69+ # Check containerRegistryAuthId is included when provided, absent when not
70+ self .assertIn ("containerRegistryAuthId" , gpu_result_with_auth )
71+ self .assertIn ('"auth123"' , gpu_result_with_auth )
72+
73+ # Check CPU pod mutation structure
6074 self .assertIn ("mutation" , cpu_result )
6175 self .assertIn ("deployCpuPod" , cpu_result )
76+ self .assertNotIn ("containerRegistryAuthId" , cpu_result )
6277
6378 def test_generate_pod_stop_mutation (self ):
6479 """
0 commit comments