@@ -561,6 +561,34 @@ def test_containerapp_revision_label_e2e(self, resource_group):
561561 self .assertEqual (len ([w for w in traffic_weight if "label" in w ]), 0 )
562562
563563
564+ class ContainerappAnonymousRegistryTests (ScenarioTest ):
565+ @AllowLargeResponse (8192 )
566+ @ResourceGroupPreparer (location = "northeurope" )
567+ @live_only () # encounters 'CannotOverwriteExistingCassetteException' only when run from recording (passes when run live)
568+ def test_containerapp_anonymous_registry (self , resource_group ):
569+ import requests
570+
571+ env = self .create_random_name (prefix = 'env' , length = 24 )
572+ app = self .create_random_name (prefix = 'aca' , length = 24 )
573+ image = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
574+
575+ self .cmd (f'containerapp env create -g { resource_group } -n { env } ' )
576+
577+ containerapp_env = self .cmd (f'containerapp env show -g { resource_group } -n { env } ' ).get_output_in_json ()
578+
579+ while containerapp_env ["properties" ]["provisioningState" ].lower () == "waiting" :
580+ time .sleep (5 )
581+ containerapp_env = self .cmd (f'containerapp env show -g { resource_group } -n { env } ' ).get_output_in_json ()
582+
583+ self .cmd (f'containerapp create -g { resource_group } -n { app } --image { image } --ingress external --target-port 80 --environment { env } ' )
584+
585+ url = self .cmd (f'containerapp show -g { resource_group } -n { app } ' ).get_output_in_json ()["properties" ]["configuration" ]["ingress" ]["fqdn" ]
586+ url = f"https://{ url } "
587+ resp = requests .get (url )
588+ self .assertTrue (resp .ok )
589+ self .assertEqual (resp .status_code , 200 )
590+
591+
564592class ContainerappRegistryIdentityTests (ScenarioTest ):
565593 @AllowLargeResponse (8192 )
566594 @ResourceGroupPreparer (location = "westeurope" )
0 commit comments