Skip to content

Re-recording an old test or creating a new test fails on next run #9591

Description

@ankitkumarr

This is a development issue while creating and running tests.

To Reproduce -

  1. Delete a test recording (that uses attribute @ResourceGroupPreparer) from a module (example- src\command_modules\azure-cli-appservice\azure\cli\command_modules\appservice\tests\latest\test_webapp_commands.py).
  2. Run the test, recording will be created and the test will pass.
  3. Re-run the test without deleting the recording this time. It will fail with error similar to
    No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001>)

I do notice that in my recording, the uri is something like - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2018-05-01

Notice the difference between clitest.rg000002 and clitest.rg000001. it feels that recording it the first time assigns a number that may not be 000001. While re-running it always expects it to be 000001.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreCLI core infrastructureTest FrameworkbugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions