def test_prod_cluster(self): cmd = MockCommand() cmd.cli_ctx.cloud.endpoints.resource_manager = "https://management.azure.com" assert not is_dogfood_cluster(cmd)
def test_longer_hostname(self): cmd = MockCommand() cmd.cli_ctx.cloud.endpoints.resource_manager = ( "https://api-dogfood.resources.windows-int.otherwebsite.net/" ) assert not is_dogfood_cluster(cmd)
def malformed_url(self): cmd = MockCommand() cmd.cli_ctx.cloud.endpoints.resource_manager = "htmalformed~2987493" assert not is_dogfood_cluster(cmd)
def test_dogfood_cluster_with_slash(self): cmd = MockCommand() cmd.cli_ctx.cloud.endpoints.resource_manager = ( "https://api-dogfood.resources.windows-int.net/" ) assert is_dogfood_cluster(cmd)