Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update support for az login --redirect-port #28775

Draft
wants to merge 20 commits into
base: dev
Choose a base branch
from
Draft

Conversation

dotnet-7
Copy link

Related command

az login

Description

Add new parameter --redirect-port for az login.

Testing Guide

Run az login --redirect-port 8400.
When you login successfully, you will be redirected to the page with port 8400.

History Notes

Copy link

azure-client-tools-bot-prd bot commented Apr 18, 2024

❌AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
🔄acs
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
️✔️advisor
️✔️latest
️✔️3.11
️✔️3.9
🔄ams
🔄latest
️✔️3.11
🔄3.9
🔄apim
🔄latest
️✔️3.11
🔄3.9
️✔️appconfig
️✔️latest
️✔️3.11
️✔️3.9
❌appservice
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_functionapp_create_with_vnet_wrong_location self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3161573fd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f31624d1cd0>
command = 'functionapp create -g clitest.rg000001 -n vnetfunctionapp000004 --plan vnetplan000005 --vnet /subscriptions/00000000-...eGroups/clitest.rg000002/providers/Microsoft.Network/virtualNetworks/vnet000007 --subnet subnet000006 -s clitest000003'
expect_failure = True

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0

src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
                                        
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
    return handle_exception(ex)
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:664: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:731: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:723: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/appservice/commands.py:46: in ex_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:701: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:334: in call
    return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
    return op(**command_args)
src/azure-cli/azure/cli/command_modules/appservice/custom.py:4600: in create_functionapp
    validate_vnet_integration_location(cmd=cmd, webapp_location=webapp_location,
src/azure-cli/azure/cli/command_modules/appservice/custom.py:353: in validate_vnet_integration_location
    vnet_location = normalize_location(cmd, vnet_location)
src/azure-cli/azure/cli/command_modules/appservice/utils.py:221: in normalize_location
    locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml object at 0x7f316034e1d0>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionappNetworkConnectionTests testMethod=test_functionapp_create_with_vnet_wrong_location>
functionapp_rg = 'clitest.rg000001', vnet_rg = 'clitest.rg000002'
storage_account = 'clitest000003'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP, parameter_name="functionapp_rg")
    @ResourceGroupPreparer(location=LINUX_ASP_LOCATION_FUNCTIONAPP, parameter_name="vnet_rg")
    @StorageAccountPreparer(resource_group_parameter_name="functionapp_rg")
    def test_functionapp_create_with_vnet_wrong_location(self, functionapp_rg, vnet_rg, storage_account):
        self.assertNotEqual(WINDOWS_ASP_LOCATION_FUNCTIONAPP, LINUX_ASP_LOCATION_FUNCTIONAPP)
    
        functionapp_name = self.create_random_name('vnetfunctionapp', 24)
        plan = self.create_random_name('vnetplan', 24)
        subnet_name = self.create_random_name('subnet', 24)
        vnet_name = self.create_random_name('vnet', 24)
    
        vnet_id = self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16 --subnet-name {} --subnet-prefix 10.0.0.0/24'.format(
            vnet_rg, vnet_name, subnet_name)).get_output_in_json()["newVNet"]["id"]
        self.cmd(
            'appservice plan create -g {} -n {} --sku P1V2'.format(functionapp_rg, plan))
>       self.cmd(
            'functionapp create -g {} -n {} --plan {} --vnet {} --subnet {} -s {}'.format(functionapp_rg, functionapp_name, plan, vnet_id, subnet_name, storage_account), expect_failure=True)

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2812: 
 
 
 
 
 
 
 
                                 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
                                       _ 

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3161573fd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f31624d1cd0>
command = 'functionapp create -g clitest.rg000001 -n vnetfunctionapp000004 --plan vnetplan000005 --vnet /subscriptions/00000000-...eGroups/clitest.rg000002/providers/Microsoft.Network/virtualNetworks/vnet000007 --subnet subnet000006 -s clitest000003'
expect_failure = True

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml') in your current record mode ('once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E           Found 2 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2795
Failed test_functionapp_vnetE2E self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f316035b6d0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.11/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/appservice/validators.py:206: in validate_functionapp_on_containerapp_vnet_add
    validate_add_vnet(cmd, namespace)
src/azure-cli/azure/cli/command_modules/appservice/validators.py:261: in validate_add_vnet
    webapp_loc = normalize_location(cmd, webapp.location)
src/azure-cli/azure/cli/command_modules/appservice/utils.py:221: in normalize_location
    locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
        

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_vnetE2E.yaml object at 0x7f315bf4cb10>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_vnetE2E.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 5 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionappNetworkConnectionTests testMethod=test_functionapp_vnetE2E>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
    @StorageAccountPreparer()
    def test_functionapp_vnetE2E(self, resource_group, storage_account):
        functionapp_name = self.create_random_name('swiftfunctionapp', 24)
        plan = self.create_random_name('swiftplan', 24)
        subnet_name = self.create_random_name('swiftsubnet', 24)
        vnet_name = self.create_random_name('swiftname', 24)
        slot = "stage"
        slot_functionapp_name = "{}-{}".format(functionapp_name, slot)
    
        self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16 --subnet-name {} --subnet-prefix 10.0.0.0/24'.format(
            resource_group, vnet_name, subnet_name))
        self.cmd(
            'appservice plan create -g {} -n {} --sku P1V2'.format(resource_group, plan))
        self.cmd(
            'functionapp create -g {} -n {} --plan {} -s {} --functions-version 4'.format(resource_group, functionapp_name, plan, storage_account))
>       self.cmd('functionapp vnet-integration add -g {} -n {} --vnet {} --subnet {}'.format(
            resource_group, functionapp_name, vnet_name, subnet_name))

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2557: 
 
 
 
 
 
 
 
 
 
 
                              
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.11/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.11/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az functionapp vnet-integration add', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2627: SystemExit
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2539
Failed test_functionapp_vnet_EP_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2635
Failed test_functionapp_vnet_basic_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2613
Failed test_functionapp_vnet_duplicate_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2657
Failed test_functionapp_vnet_integration_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2581
Failed test_webapp_access_restriction_add_service_tag_validation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:141
Failed test_webapp_access_restriction_mixed_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:264
Failed test_webapp_create_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2445
Failed test_webapp_create_with_vnet_by_subnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2472
Failed test_webapp_create_with_vnet_by_vnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2498
Failed test_webapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2541
Failed test_webapp_vnetDelegation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2611
Failed test_webapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2402
Failed test_webapp_vnetRouteAll The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2722
Failed test_webapp_vnetSameName The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2643
Failed test_webapp_vnetSubnetId The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2693
❌3.9
Type Test Case Error Message Line
Failed test_functionapp_create_with_vnet_wrong_location self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5ace4cf9d0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f5ace1d0df0>
command = 'functionapp create -g clitest.rg000001 -n vnetfunctionapp000004 --plan vnetplan000005 --vnet /subscriptions/00000000-...eGroups/clitest.rg000002/providers/Microsoft.Network/virtualNetworks/vnet000007 --subnet subnet000006 -s clitest000003'
expect_failure = True

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0

src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
                                        
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
    return handle_exception(ex)
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:664: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:731: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:723: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/appservice/commands.py:46: in ex_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:701: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:334: in call
    return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
    return op(**command_args)
src/azure-cli/azure/cli/command_modules/appservice/custom.py:4600: in create_functionapp
    validate_vnet_integration_location(cmd=cmd, webapp_location=webapp_location,
src/azure-cli/azure/cli/command_modules/appservice/custom.py:353: in validate_vnet_integration_location
    vnet_location = normalize_location(cmd, vnet_location)
src/azure-cli/azure/cli/command_modules/appservice/utils.py:221: in normalize_location
    locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.9/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.9/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.9/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml object at 0x7f5ac7d4d970>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.9/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionappNetworkConnectionTests testMethod=test_functionapp_create_with_vnet_wrong_location>
functionapp_rg = 'clitest.rg000001', vnet_rg = 'clitest.rg000002'
storage_account = 'clitest000003'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP, parameter_name="functionapp_rg")
    @ResourceGroupPreparer(location=LINUX_ASP_LOCATION_FUNCTIONAPP, parameter_name="vnet_rg")
    @StorageAccountPreparer(resource_group_parameter_name="functionapp_rg")
    def test_functionapp_create_with_vnet_wrong_location(self, functionapp_rg, vnet_rg, storage_account):
        self.assertNotEqual(WINDOWS_ASP_LOCATION_FUNCTIONAPP, LINUX_ASP_LOCATION_FUNCTIONAPP)
    
        functionapp_name = self.create_random_name('vnetfunctionapp', 24)
        plan = self.create_random_name('vnetplan', 24)
        subnet_name = self.create_random_name('subnet', 24)
        vnet_name = self.create_random_name('vnet', 24)
    
        vnet_id = self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16 --subnet-name {} --subnet-prefix 10.0.0.0/24'.format(
            vnet_rg, vnet_name, subnet_name)).get_output_in_json()["newVNet"]["id"]
        self.cmd(
            'appservice plan create -g {} -n {} --sku P1V2'.format(functionapp_rg, plan))
>       self.cmd(
            'functionapp create -g {} -n {} --plan {} --vnet {} --subnet {} -s {}'.format(functionapp_rg, functionapp_name, plan, vnet_id, subnet_name, storage_account), expect_failure=True)

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2812: 
 
 
 
 
 
 
 
                                 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
                                       _ 

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5ace4cf9d0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f5ace1d0df0>
command = 'functionapp create -g clitest.rg000001 -n vnetfunctionapp000004 --plan vnetplan000005 --vnet /subscriptions/00000000-...eGroups/clitest.rg000002/providers/Microsoft.Network/virtualNetworks/vnet000007 --subnet subnet000006 -s clitest000003'
expect_failure = True

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_create_with_vnet_wrong_location.yaml') in your current record mode ('once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E           Found 2 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2795
Failed test_functionapp_vnetE2E self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f5acd08f9a0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.9/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/appservice/validators.py:206: in validate_functionapp_on_containerapp_vnet_add
    validate_add_vnet(cmd, namespace)
src/azure-cli/azure/cli/command_modules/appservice/validators.py:261: in validate_add_vnet
    webapp_loc = normalize_location(cmd, webapp.location)
src/azure-cli/azure/cli/command_modules/appservice/utils.py:221: in normalize_location
    locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.9/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.9/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.9/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
        

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_vnetE2E.yaml object at 0x7f5ac7a496d0>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_vnetE2E.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 5 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.9/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionappNetworkConnectionTests testMethod=test_functionapp_vnetE2E>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP)
    @StorageAccountPreparer()
    def test_functionapp_vnetE2E(self, resource_group, storage_account):
        functionapp_name = self.create_random_name('swiftfunctionapp', 24)
        plan = self.create_random_name('swiftplan', 24)
        subnet_name = self.create_random_name('swiftsubnet', 24)
        vnet_name = self.create_random_name('swiftname', 24)
        slot = "stage"
        slot_functionapp_name = "{}-{}".format(functionapp_name, slot)
    
        self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16 --subnet-name {} --subnet-prefix 10.0.0.0/24'.format(
            resource_group, vnet_name, subnet_name))
        self.cmd(
            'appservice plan create -g {} -n {} --sku P1V2'.format(resource_group, plan))
        self.cmd(
            'functionapp create -g {} -n {} --plan {} -s {} --functions-version 4'.format(resource_group, functionapp_name, plan, storage_account))
>       self.cmd('functionapp vnet-integration add -g {} -n {} --vnet {} --subnet {}'.format(
            resource_group, functionapp_name, vnet_name, subnet_name))

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2557: 
 
 
 
 
 
 
 
 
 
 
                              
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.9/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.9/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az functionapp vnet-integration add', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/argparse.py:2569: SystemExit
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2539
Failed test_functionapp_vnet_EP_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2635
Failed test_functionapp_vnet_basic_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2613
Failed test_functionapp_vnet_duplicate_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2657
Failed test_functionapp_vnet_integration_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2581
Failed test_webapp_access_restriction_add_service_tag_validation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:141
Failed test_webapp_access_restriction_mixed_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:264
Failed test_webapp_create_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2445
Failed test_webapp_create_with_vnet_by_subnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2472
Failed test_webapp_create_with_vnet_by_vnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2498
Failed test_webapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2541
Failed test_webapp_vnetDelegation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2611
Failed test_webapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2402
Failed test_webapp_vnetRouteAll The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2722
Failed test_webapp_vnetSameName The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2643
Failed test_webapp_vnetSubnetId The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2693
🔄aro
🔄latest
🔄3.11
🔄3.9
🔄backup
🔄latest
🔄3.11
🔄3.9
🔄batch
🔄latest
🔄3.11
🔄3.9
️✔️batchai
️✔️latest
️✔️3.11
️✔️3.9
️✔️billing
️✔️latest
️✔️3.11
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.11
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.11
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.11
️✔️3.9
🔄cognitiveservices
🔄latest
️✔️3.11
🔄3.9
️✔️config
️✔️latest
️✔️3.11
️✔️3.9
️✔️configure
️✔️latest
️✔️3.11
️✔️3.9
🔄consumption
🔄latest
️✔️3.11
🔄3.9
️✔️container
️✔️latest
️✔️3.11
️✔️3.9
❌containerapp
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_containerapp_custom_domains_app_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/containerapp/tests/latest/test_containerapp_commands.py:240
🔄3.9
🔄core
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
🔄cosmosdb
🔄latest
️✔️3.11
🔄3.9
🔄databoxedge
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
️✔️dla
️✔️latest
️✔️3.11
️✔️3.9
️✔️dls
️✔️latest
️✔️3.11
️✔️3.9
🔄dms
🔄latest
️✔️3.11
🔄3.9
️✔️eventgrid
️✔️latest
️✔️3.11
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.11
️✔️3.9
🔄feedback
🔄latest
️✔️3.11
🔄3.9
️✔️find
️✔️latest
️✔️3.11
️✔️3.9
❌hdinsight
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_hdinsight_cluster_kafka_with_rest_proxy self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f1077adfd50>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f1077ac6dd0>
command = 'hdinsight create -n hdicli-000003 -g hdicli-000001 -l southcentralus -p Password1! -t spark --no-validation-timeout -...fe41 --kafka-client-group-name KafakaRestProperties -v 4.0 --component-version kafka=2.1 --location "South Central US"'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0

src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
                                        
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
    return handle_exception(ex)
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:589: in execute
    parsed_args = self.parser.parse_args(args)
env/lib/python3.11/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1874: in parse_args
    args, argv = self.parse_known_args(args, namespace)
src/azure-cli-core/azure/cli/core/parser.py:281: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1907: in parse_known_args
    namespace, args = self.parse_known_args(args, namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2110: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2087: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1983: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1246: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
src/azure-cli-core/azure/cli/core/parser.py:281: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1907: in parse_known_args
    namespace, args = self.parse_known_args(args, namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2110: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2087: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1983: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1246: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
src/azure-cli-core/azure/cli/core/parser.py:281: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1907: in parse_known_args
    namespace, args = self.parse_known_args(args, namespace)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2128: in parse_known_args
    start_index = consume_optional(start_index)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2068: in consume_optional
    take_action(action, args, option_string)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:1967: in take_action
    argument_values = self.get_values(action, argument_strings)
src/azure-cli-core/azure/cli/core/parser.py:272: in get_values
    value = super(AzCliCommandParser, self).get_values(action, arg_strings)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2506: in get_values
    value = self.get_value(action, arg_string)
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2539: in get_value
    result = type_func(arg_string)
src/azure-cli-core/azure/cli/core/commands/parameters.py:98: in location_name_type
    name = next((location.name for location in get_subscription_locations(cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/recordings/test_hdinsight_cluster_kafka_with_rest_proxy.yaml object at 0x7f107778ef90>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/recordings/test_hdinsight_cluster_kafka_with_rest_proxy.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.hdinsight.tests.latest.test_hdinsight_commands.HDInsightClusterTests testMethod=test_hdinsight_cluster_kafka_with_rest_proxy>
storage_account_info = ('hdicli000002', 'veryFakedStorageAccountKey==')

    @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):
>       self.create_hdinsight_cluster(
            HDInsightClusterTests.wasb_arguments(storage_account_info),
            HDInsightClusterTests.kafka_arguments(),
            HDInsightClusterTests.rest_proxy_arguments()
        )

src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py:56: 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         
src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py:577: in create_hdinsight_cluster
    self.cmd(create_cluster_format, checks=[
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f1077adfd50>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f1077ac6dd0>
command = 'hdinsight create -n hdicli-000003 -g hdicli-000001 -l southcentralus -p Password1! -t spark --no-validation-timeout -...fe41 --kafka-client-group-name KafakaRestProperties -v 4.0 --component-version kafka=2.1 --location "South Central US"'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/recordings/test_hdinsight_cluster_kafka_with_rest_proxy.yaml') in your current record mode ('once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>) was found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py:52
🔄3.9
🔄identity
🔄latest
🔄3.11
🔄3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
🔄keyvault
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
🔄kusto
🔄latest
️✔️3.11
🔄3.9
️✔️lab
️✔️latest
️✔️3.11
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.11
️✔️3.9
🔄maps
🔄latest
️✔️3.11
🔄3.9
🔄marketplaceordering
🔄latest
️✔️3.11
🔄3.9
️✔️monitor
️✔️latest
️✔️3.11
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.11
️✔️3.9
🔄netappfiles
🔄latest
🔄3.11
🔄3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.11
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.11
️✔️3.9
🔄profile
🔄latest
🔄3.11
🔄3.9
🔄rdbms
🔄latest
🔄3.11
🔄3.9
️✔️redis
️✔️latest
️✔️3.11
️✔️3.9
️✔️relay
️✔️latest
️✔️3.11
️✔️3.9
❌resource
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_aaz_resource_location_arg_fmt self = <azure.cli.command_modules.resource.tests.latest.test_aaz_resource_arg_format.TestAAZResourceArgFmt testMethod=test_aaz_resource_location_arg_fmt>
resource_group = 'test_resource_location_arg_fmt000001'

    @ResourceGroupPreparer(name_prefix='test_resource_location_arg_fmt', location="eastus2")
    def test_aaz_resource_location_arg_fmt(self, resource_group):
        from azure.cli.core.aaz.arg import AAZArgumentsSchema
        from azure.cli.core.azclierror import InvalidArgumentValueError
        from azure.cli.core.aaz import AAZResourceGroupNameArg, AAZResourceLocationArg, AAZResourceLocationArgFormat, AAZStrArg
    
        schema = AAZArgumentsSchema()
        schema.rg_name = AAZResourceGroupNameArg()
        schema.location = AAZResourceLocationArg(
            fmt=AAZResourceLocationArgFormat(resource_group_arg='rg_name'),
            nullable=True
        )
        schema.name = AAZStrArg()
    
        args = self.format_arg(schema, {
            "rg_name": resource_group,
        })
        self.assertEqual(args.to_serialized_data(), {
            "rg_name": resource_group,
            "location": "eastus2"
        })
    
        args = self.format_arg(schema, {
            "rg_name": resource_group,
            "location": "westus"
        })
        self.assertEqual(args.to_serialized_data(), {
            "rg_name": resource_group,
            "location": "westus"
        })
    
>       args = self.format_arg(schema, {
            "rg_name": resource_group,
            "location": "North Central US"
        })

src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:52: 
                                        
src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:18: in format_arg
    ctx.format_args()
src/azure-cli-core/azure/cli/core/aaz/command_ctx.py:53: in format_args
    self.args.schema.fmt(ctx=self, value=self.args)
src/azure-cli-core/azure/cli/core/aaz/arg_fmt.py:399: in call
    value[field_name] = field_schema.fmt(ctx, value[field_name])
src/azure-cli-core/azure/cli/core/aaz/arg_fmt.py:569: in call
    for location in get_subscription_locations(ctx):
src/azure-cli-core/azure/cli/core/aaz/command_ctx.py:123: in get_subscription_locations
    return get_subscription_locations(ctx.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
      

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_aaz_resource_location_arg_fmt.yaml object at 0x7f4ef787bc10>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self._vcr_request):
            log.info(f"Playing response for {self._vcr_request} from cassette")
            response = self.cassette.play_response(self._vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self._vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self._vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_aaz_resource_location_arg_fmt.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException
azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:20
❌3.9
Type Test Case Error Message Line
Failed test_aaz_resource_location_arg_fmt self = <azure.cli.command_modules.resource.tests.latest.test_aaz_resource_arg_format.TestAAZResourceArgFmt testMethod=test_aaz_resource_location_arg_fmt>
resource_group = 'test_resource_location_arg_fmt000001'

    @ResourceGroupPreparer(name_prefix='test_resource_location_arg_fmt', location="eastus2")
    def test_aaz_resource_location_arg_fmt(self, resource_group):
        from azure.cli.core.aaz.arg import AAZArgumentsSchema
        from azure.cli.core.azclierror import InvalidArgumentValueError
        from azure.cli.core.aaz import AAZResourceGroupNameArg, AAZResourceLocationArg, AAZResourceLocationArgFormat, AAZStrArg
    
        schema = AAZArgumentsSchema()
        schema.rg_name = AAZResourceGroupNameArg()
        schema.location = AAZResourceLocationArg(
            fmt=AAZResourceLocationArgFormat(resource_group_arg='rg_name'),
            nullable=True
        )
        schema.name = AAZStrArg()
    
        args = self.format_arg(schema, {
            "rg_name": resource_group,
        })
        self.assertEqual(args.to_serialized_data(), {
            "rg_name": resource_group,
            "location": "eastus2"
        })
    
        args = self.format_arg(schema, {
            "rg_name": resource_group,
            "location": "westus"
        })
        self.assertEqual(args.to_serialized_data(), {
            "rg_name": resource_group,
            "location": "westus"
        })
    
>       args = self.format_arg(schema, {
            "rg_name": resource_group,
            "location": "North Central US"
        })

src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:52: 
                                        
src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:18: in format_arg
    ctx.format_args()
src/azure-cli-core/azure/cli/core/aaz/command_ctx.py:53: in format_args
    self.args.schema.fmt(ctx=self, value=self.args)
src/azure-cli-core/azure/cli/core/aaz/arg_fmt.py:399: in call
    value[field_name] = field_schema.fmt(ctx, value[field_name])
src/azure-cli-core/azure/cli/core/aaz/arg_fmt.py:569: in call
    for location in get_subscription_locations(ctx):
src/azure-cli-core/azure/cli/core/aaz/command_ctx.py:123: in get_subscription_locations
    return get_subscription_locations(ctx.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.9/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.9/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.9/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
      

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_aaz_resource_location_arg_fmt.yaml object at 0x7fcfe101e1c0>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self._vcr_request):
            log.info(f"Playing response for {self._vcr_request} from cassette")
            response = self.cassette.play_response(self._vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self._vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self._vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_aaz_resource_location_arg_fmt.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.9/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException
azure/cli/command_modules/resource/tests/latest/test_aaz_resource_arg_format.py:20
🔄role
🔄latest
️✔️3.11
🔄3.9
️✔️search
️✔️latest
️✔️3.11
️✔️3.9
🔄security
🔄latest
🔄3.11
🔄3.9
️✔️servicebus
️✔️latest
️✔️3.11
️✔️3.9
🔄serviceconnector
🔄latest
️✔️3.11
🔄3.9
️✔️servicefabric
️✔️latest
️✔️3.11
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.11
️✔️3.9
️✔️sql
️✔️latest
️✔️3.11
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.11
️✔️3.9
🔄storage
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
️✔️synapse
️✔️latest
️✔️3.11
️✔️3.9
🔄telemetry
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
️✔️util
️✔️latest
️✔️3.11
️✔️3.9
❌vm
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_defer_only_commands self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7efcb64b8f90>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.11/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/vm/image_builder.py:200: in process_image_template_create_namespace
    subscription_locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
           

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_defer_only_commands.yaml object at 0x7efcb5e10b50>
 = False, kwargs = {'buffering': True}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_defer_only_commands.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_image_builder_commands.ImageTemplateTest testMethod=test_defer_only_commands>
resource_group = 'img_defer_only_commands000001'
resource_group_location = 'westus2'

    @ResourceGroupPreparer(name_prefix='img_defer_only_commands', location='westus2')
    def test_defer_only_commands(self, resource_group, resource_group_location):
        def ensure_cmd_raises_defer_error(self, cmds):
            for cmd in cmds:
                with self.assertRaisesRegex(CLIError, "This command requires --defer"):
                    self.cmd(cmd)
    
        self.identity_role(resource_group)
    
        self.kwargs.update({
            'tmpl': 'template01',
            'img_src': WIN_IMAGE_SOURCE,
            'script_url': TEST_PWSH_SCRIPT_URL,
            'pwsh_name': 'powershell_script',
            'vhd_name': 'example.vhd',
        })
    
>       self.cmd('image builder create -n {tmpl} -g {rg} --scripts {script_url} --image-source {img_src} --identity {ide} --defer')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:905: 
 
 
 
 
 
 
 
 
 
 
                              
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.11/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.11/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az image builder create', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2627: SystemExit
azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:887
Failed test_image_build_identity self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7efcb5cfbbd0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.11/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/vm/image_builder.py:200: in process_image_template_create_namespace
    subscription_locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.11/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.11/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.11/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.11/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.11/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.11/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.11/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.11/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
           

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_build_identity.yaml object at 0x7efcb5baa690>
 = False, kwargs = {'buffering': True}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_build_identity.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.11/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_image_builder_commands.ImageTemplateTest testMethod=test_image_build_identity>
resource_group = 'img_tmpl_identity_000001'

    @ResourceGroupPreparer(name_prefix='img_tmpl_identity
')
    def test_image_build_identity(self, resource_group):
        self.identity_role(resource_group)
    
        self.kwargs.update({
            'img_src': LINUX_IMAGE_SOURCE,
            'gallery': self.create_random_name("sig
", 10),
            'sig1': 'image1',
            'tmpl': 'template01',
            'script': TEST_SHELL_SCRIPT_URL
        })
    
        self.cmd('sig create -g {rg} --gallery-name {gallery}')
        self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {sig1} '
                 '--os-type linux -p publisher1 -f offer1 -s sku1')
    
>       self.cmd(
            'image builder create -n {tmpl} -g {rg} --scripts {script} --image-source {img_src} --identity {ide} --defer')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:677: 
 
 
 
 
 
 
 
                                 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.11/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.11/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
                                   _ 

self = AzCliCommandParser(prog='az image builder create', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/argparse.py:2627: SystemExit
azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:660
Failed test_image_build_managed_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:471
Failed test_image_build_output_versioning The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:563
Failed test_image_build_shared_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:510
Failed test_image_build_trigger The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:623
Failed test_image_builder_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:124
Failed test_image_builder_basic_sig The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:434
Failed test_image_builder_cancel The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:922
Failed test_image_builder_customizers The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:723
Failed test_image_builder_template_error_handler The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:383
Failed test_image_builder_template_optimizer The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:326
Failed test_image_builder_template_validator The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:227
Failed test_image_builder_vm_profile The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:944
Failed test_image_template_outputs The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:828
Failed test_vm_image_list_thru_services_edge_zone_by_arch The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:122
Failed test_vm_image_list_thru_services_filtered_by_arch The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:117
Failed test_vm_images_list_thru_services_edge_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:112
Failed test_vmss_extension_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2665
Failed test_vm_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2763
Failed test_vm_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2850
Failed test_vmss_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4356
Failed test_vmss_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4413
Failed test_vm_image_terms The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7562
❌3.9
Type Test Case Error Message Line
Failed test_defer_only_commands self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f2c10dd98b0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.9/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/vm/image_builder.py:200: in process_image_template_create_namespace
    subscription_locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.9/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.9/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.9/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
           

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_defer_only_commands.yaml object at 0x7f2c10137c70>
 = False, kwargs = {'buffering': True}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_defer_only_commands.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.9/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_image_builder_commands.ImageTemplateTest testMethod=test_defer_only_commands>
resource_group = 'img_defer_only_commands000001'
resource_group_location = 'westus2'

    @ResourceGroupPreparer(name_prefix='img_defer_only_commands', location='westus2')
    def test_defer_only_commands(self, resource_group, resource_group_location):
        def ensure_cmd_raises_defer_error(self, cmds):
            for cmd in cmds:
                with self.assertRaisesRegex(CLIError, "This command requires --defer"):
                    self.cmd(cmd)
    
        self.identity_role(resource_group)
    
        self.kwargs.update({
            'tmpl': 'template01',
            'img_src': WIN_IMAGE_SOURCE,
            'script_url': TEST_PWSH_SCRIPT_URL,
            'pwsh_name': 'powershell_script',
            'vhd_name': 'example.vhd',
        })
    
>       self.cmd('image builder create -n {tmpl} -g {rg} --scripts {script_url} --image-source {img_src} --identity {ide} --defer')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:905: 
 
 
 
 
 
 
 
 
 
 
                              
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.9/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.9/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az image builder create', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/argparse.py:2569: SystemExit
azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:887
Failed test_image_build_identity self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f2c100856d0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
>               self.validate_cmd_level(parsed_ns, cmd_validator)

env/lib/python3.9/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:884: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/vm/image_builder.py:200: in process_image_template_create_namespace
    subscription_locations = get_subscription_locations(cmd.cli_ctx)
src/azure-cli-core/azure/cli/core/commands/parameters.py:28: in get_subscription_locations
    return list(subscription_client.subscriptions.list_locations(subscription_id))
env/lib/python3.9/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.9/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.9/site-packages/azure/mgmt/resource/subscriptions/v2022_12_01/operations/operations.py:396: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:213: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:181: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:467: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:115: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:70: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:108: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:338: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
           

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_build_identity.yaml object at 0x7f2c0bf2b070>
 = False, kwargs = {'buffering': True}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_build_identity.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2022-12-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.9/site-packages/vcr/stubs/init.py:263: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_image_builder_commands.ImageTemplateTest testMethod=test_image_build_identity>
resource_group = 'img_tmpl_identity_000001'

    @ResourceGroupPreparer(name_prefix='img_tmpl_identity
')
    def test_image_build_identity(self, resource_group):
        self.identity_role(resource_group)
    
        self.kwargs.update({
            'img_src': LINUX_IMAGE_SOURCE,
            'gallery': self.create_random_name("sig
", 10),
            'sig1': 'image1',
            'tmpl': 'template01',
            'script': TEST_SHELL_SCRIPT_URL
        })
    
        self.cmd('sig create -g {rg} --gallery-name {gallery}')
        self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {sig1} '
                 '--os-type linux -p publisher1 -f offer1 -s sku1')
    
>       self.cmd(
            'image builder create -n {tmpl} -g {rg} --scripts {script} --image-source {img_src} --identity {ide} --defer')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:677: 
 
 
 
 
 
 
 
                                 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
env/lib/python3.9/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:652: in execute
    self.validation(expanded_arg)
env/lib/python3.9/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
                                   _ 

self = AzCliCommandParser(prog='az image builder create', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/argparse.py:2569: SystemExit
azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:660
Failed test_image_build_managed_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:471
Failed test_image_build_output_versioning The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:563
Failed test_image_build_shared_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:510
Failed test_image_build_trigger The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:623
Failed test_image_builder_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:124
Failed test_image_builder_basic_sig The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:434
Failed test_image_builder_cancel The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:922
Failed test_image_builder_customizers The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:723
Failed test_image_builder_template_error_handler The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:383
Failed test_image_builder_template_optimizer The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:326
Failed test_image_builder_template_validator The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:227
Failed test_image_builder_vm_profile The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:944
Failed test_image_template_outputs The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:828
Failed test_vm_image_list_thru_services_edge_zone_by_arch The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:122
Failed test_vm_image_list_thru_services_filtered_by_arch The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:117
Failed test_vm_images_list_thru_services_edge_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:112
Failed test_vmss_extension_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2665
Failed test_vm_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2763
Failed test_vm_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2850
Failed test_vmss_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4356
Failed test_vmss_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4413
Failed test_vm_image_terms The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7562

Copy link

Hi @dotnet-7,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

azure-client-tools-bot-prd bot commented Apr 18, 2024

⚠️AzureCLI-BreakingChangeTest
⚠️profile
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd login cmd login added parameter redirect_port

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 18, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

@v-xuto
Copy link
Member

v-xuto commented May 13, 2024

@jongio for notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants