Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def default_api_version(self):
'policy_exemptions': '2020-07-01-preview'
}),
ResourceType.MGMT_RESOURCE_RESOURCES: '2022-09-01',
ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2019-11-01',
ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2022-12-01',
ResourceType.MGMT_RESOURCE_DEPLOYMENTSCRIPTS: '2020-10-01',
ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2021-05-01',
ResourceType.MGMT_RESOURCE_DEPLOYMENTSTACKS: '2022-08-01-preview',
Expand Down
14 changes: 6 additions & 8 deletions src/azure-cli-core/azure/cli/core/tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,18 +1454,16 @@ def __init__(self, tenant_id, display_name="DISPLAY_NAME"):


class TestUtils(unittest.TestCase):
def test_attach_token_tenant(self):
from azure.mgmt.resource.subscriptions.v2016_06_01.models import Subscription \
as Subscription_v2016_06_01
subscription = Subscription_v2016_06_01()
def test_attach_token_tenant_v2016_06_01(self):
from azure.mgmt.resource.subscriptions.v2016_06_01.models import Subscription
subscription = Subscription()
_attach_token_tenant(subscription, "token_tenant_1")
self.assertEqual(subscription.tenant_id, "token_tenant_1")
self.assertFalse(hasattr(subscription, "home_tenant_id"))

def test_attach_token_tenant_v2016_06_01(self):
from azure.mgmt.resource.subscriptions.v2019_11_01.models import Subscription \
as Subscription_v2019_11_01
subscription = Subscription_v2019_11_01()
def test_attach_token_tenant_v2022_12_01(self):
from azure.mgmt.resource.subscriptions.v2022_12_01.models import Subscription
subscription = Subscription()
subscription.tenant_id = "home_tenant_1"
_attach_token_tenant(subscription, "token_tenant_1")
self.assertEqual(subscription.tenant_id, "token_tenant_1")
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def test_containerapp_ingress_traffic_e2e(self, resource_group):
for revision in revisions_list:
self.assertEqual(revision["properties"]["trafficWeight"], 50)

@unittest.skip('https://github.com/Azure/azure-cli/issues/28680')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AllowLargeResponse(8192)
@ResourceGroupPreparer(location="westeurope")
@LogAnalyticsWorkspacePreparer(location="eastus", get_shared_key=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@


import os
import unittest

from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer
from azure.cli.testsdk.scenario_tests import record_only
Expand Down Expand Up @@ -50,6 +51,7 @@ def test_hdinsight_cluster_kafka(self, storage_account_info):

# Uses 'rg' kwarg
# _rest_proxy_arguments() will override location to southcentralus, so use this location for rg and sa
@unittest.skip('https://github.com/Azure/azure-cli/issues/28860')
Copy link
Member Author

@jiasli jiasli Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ResourceGroupPreparer(name_prefix='hdicli-', location='southcentralus', random_name_length=12)
@StorageAccountPreparer(name_prefix='hdicli', location='southcentralus', parameter_name='storage_account')
def test_hdinsight_cluster_kafka_with_rest_proxy(self, storage_account_info):
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
INDEX_FILE = "https://raw.githubusercontent.com/danielsollondon/azvmimagebuilder/master/quickquickstarts/exampleArtifacts/buildArtifacts/index.html"


@unittest.skip("https://github.com/Azure/azure-cli/issues/28909")
Copy link
Member Author

@jiasli jiasli May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class ImageTemplateTest(ScenarioTest):
def _assign_ib_permissions(self, rg): # need to manually give IB service permission to add image to grou
subscription_id = self.get_subscription_id()
Expand Down Expand Up @@ -658,6 +659,7 @@ def test_image_build_trigger(self, resource_group):
])
self.cmd('image builder trigger delete --image-template-name {tmpl} -g {rg} --trigger-name {trigger} --yes')

@unittest.skip('https://github.com/Azure/azure-cli/issues/28677')
Copy link
Member Author

@jiasli jiasli Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ResourceGroupPreparer(name_prefix='img_tmpl_identity_')
def test_image_build_identity(self, resource_group):
self._identity_role(resource_group)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2663,6 +2663,7 @@ def test_vmss_extension_instance_name(self):

class VMSSExtensionImageTest(ScenarioTest):

@live_only() # https://github.com/Azure/azure-cli/issues/28678
Copy link
Member Author

@jiasli jiasli Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AllowLargeResponse()
@ResourceGroupPreparer(name_prefix='cli_test_vmss_extension_image_')
def test_vmss_extension_image(self, resource_group):
Expand Down