@@ -619,7 +619,7 @@ def common_get_disable_fips_image(self):
619619 self .assertEqual (ctx_1 .get_disable_fips_image (), True )
620620
621621 def common_get_enable_kata_image (self ):
622- # default
622+ # testing new kata naming convention
623623 ctx_1 = AKSPreviewAgentPoolContext (
624624 self .cmd ,
625625 AKSAgentPoolParamDict ({
@@ -630,10 +630,24 @@ def common_get_enable_kata_image(self):
630630 self .agentpool_decorator_mode ,
631631 )
632632 self .assertEqual (ctx_1 .get_workload_runtime (), CONST_WORKLOAD_RUNTIME_OCI_CONTAINER )
633- agentpool = self .create_initialized_agentpool_instance (workload_runtime = CONST_WORKLOAD_RUNTIME_KATA_VM_ISOLATION )
634- ctx_1 .attach_agentpool (agentpool )
635- # self.assertEqual(ctx_1.get_enable_fips_image(), True)
636- self .assertEqual (ctx_1 .get_workload_runtime , CONST_WORKLOAD_RUNTIME_KATA_VM_ISOLATION )
633+ agentpool_1 = self .create_initialized_agentpool_instance (workload_runtime = CONST_WORKLOAD_RUNTIME_KATA_VM_ISOLATION )
634+ ctx_1 .attach_agentpool (agentpool_1 )
635+ self .assertEqual (ctx_1 .get_workload_runtime (), CONST_WORKLOAD_RUNTIME_KATA_VM_ISOLATION )
636+
637+ # tesing old kata naming convention
638+ ctx_2 = AKSPreviewAgentPoolContext (
639+ self .cmd ,
640+ AKSAgentPoolParamDict ({
641+ "workload_runtime" : CONST_WORKLOAD_RUNTIME_OLD_KATA_VM_ISOLATION ,
642+ }),
643+ self .models ,
644+ DecoratorMode .CREATE ,
645+ self .agentpool_decorator_mode ,
646+ )
647+ self .assertEqual (ctx_2 .get_workload_runtime (), CONST_WORKLOAD_RUNTIME_OCI_CONTAINER )
648+ agentpool_2 = self .create_initialized_agentpool_instance (workload_runtime = CONST_WORKLOAD_RUNTIME_OLD_KATA_VM_ISOLATION )
649+ ctx_2 .attach_agentpool (agentpool_2 )
650+ self .assertEqual (ctx_2 .get_workload_runtime (), CONST_WORKLOAD_RUNTIME_OLD_KATA_VM_ISOLATION )
637651
638652
639653 def common_get_agentpool_windows_profile (self ):
0 commit comments