From 555e53365d5b8a31a368ca7c68472fa905155b74 Mon Sep 17 00:00:00 2001 From: v-soujanya <101401302+v-soujanya@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:09:56 +0530 Subject: [PATCH] released workflow and test file changes (#1432) * released workflow and test file changes * changing the test references * added org variable * ignored integrationtest cases as temporary fix * added recordings --- .github/actions/run-tests/action.yml | 4 +-- .github/workflows/merge-workflow.yml | 2 +- .github/workflows/pr-workflow.yml | 2 +- .github/workflows/released-version.yml | 34 +++++++++++++++++++ .../azext_devops/{test => tests}/__init__.py | 0 .../azext_devops/{test => tests}/conftest.py | 0 .../latest}/artifacts/__init__.py | 0 .../latest}/artifacts/test_univeral.py | 0 .../{test => tests/latest}/boards/__init__.py | 0 .../latest}/boards/test_area.py | 4 +-- .../latest}/boards/test_boards_helper.py | 0 .../latest}/boards/test_iteration.py | 4 +-- .../latest}/boards/test_workitem.py | 4 +-- .../{test => tests/latest}/common/__init__.py | 0 .../latest}/common/test_arguments.py | 0 .../latest}/common/test_credentials.py | 0 .../latest}/common/test_format.py | 0 .../latest}/common/test_pip_helper.py | 0 .../latest}/common/test_services.py | 0 .../latest}/common/test_telemetry.py | 0 .../{test => tests/latest}/common/test_uri.py | 0 .../latest}/common/test_uuid.py | 0 .../latest}/common/test_vsts_git_url_info.py | 0 .../latest/integrationtests}/__init__.py | 0 ..._admin_banner_addUpdateShowListRemove.yaml | 0 .../recordings/test_boards_areas.yaml | 0 .../recordings/test_boards_iterations.yaml | 0 .../test_boards_releations_create_remove.yaml | 0 .../recordings/test_build_cancel.yaml | 0 .../test_build_definition_listShow.yaml | 0 .../recordings/test_build_listQueueShow.yaml | 0 .../test_build_tag_listAddDelete.yaml | 0 .../test_devops_group_and_member_tests.yaml | 0 ..._devops_projects_CreateListShowDelete.yaml | 0 ...test_devops_security_permission_tests.yaml | 0 ..._createUpdateShowListDeleteListMember.yaml | 0 ..._user_command_addUpdateListShowRemove.yaml | 0 .../recordings/test_extension_search.yaml | 0 .../recordings/test_invoke_command_basic.yaml | 0 ...st_pipeline_create_and_variables_test.yaml | 0 .../recordings/test_pipeline_folders.yaml | 0 .../test_pipeline_pools_and_agents.yaml | 0 .../recordings/test_pipeline_queues.yaml | 0 ...istAbandonReactivateCompleteReviewers.yaml | 0 .../test_pull_request_policies_workitems.yaml | 0 .../recordings/test_queryShow.yaml | 0 .../recordings/test_ref_createDeleteFlow.yaml | 0 .../test_ref_createListUpdateDelete.yaml | 0 .../test_repos_createListShowDelete.yaml | 0 .../recordings/test_repos_import_create.yaml | 0 ...s_policies_createUpdateShowListDelete.yaml | 0 .../recordings/test_variable_group.yaml | 0 ...st_wiki_and_page_createListShowDelete.yaml | 0 .../test_workItemCreateShowUpdateDelete.yaml | 0 .../integrationtests}/test_adminBannerTest.py | 2 +- .../integrationtests}/test_boardsAreaTest.py | 2 +- .../test_boardsIterationTest.py | 2 +- .../integrationtests}/test_boardsQueryTest.py | 2 +- .../test_boardsRelationTest.py | 2 +- .../test_boardsWorkItemTest.py | 2 +- .../test_devopsProjectTest.py | 2 +- .../test_devopsSecurityGroupTest.py | 2 +- .../test_devopsSecurityPermissionTest.py | 2 +- .../integrationtests}/test_devopsTeamTest.py | 2 +- .../integrationtests}/test_devopsUserTest.py | 2 +- .../integrationtests}/test_extensionSearch.py | 2 +- .../integrationtests}/test_gitAliasTest.py | 0 .../latest/integrationtests}/test_invoke.py | 2 +- .../test_pipelineAgentPoolQueueTest.py | 2 +- .../test_pipelineFoldersTest.py | 2 +- .../test_pipelinesBuildCancelTest.py | 2 +- .../test_pipelinesBuildDefinitionsTest.py | 2 +- .../test_pipelinesBuildTagTest.py | 2 +- .../test_pipelinesBuildTest.py | 2 +- .../test_pipelinesCreateAndVariablesTest.py | 2 +- .../integrationtests}/test_reposImportTest.py | 2 +- .../test_reposPoliciesTest.py | 12 +++---- .../test_reposPrCommandsReviewersTest.py | 2 +- .../test_reposPrPoliciesWorkItemsTest.py | 16 ++++----- .../test_reposRefDeleteFlowTest.py | 2 +- .../integrationtests}/test_reposRefTest.py | 2 +- .../integrationtests}/test_reposRepoTest.py | 2 +- .../integrationtests}/test_variableGroup.py | 2 +- .../test_wikiAndPagesTest.py | 2 +- .../integrationtests}/utilities/__init__.py | 0 .../integrationtests}/utilities/helper.py | 0 .../latest}/pipelines/__init__.py | 0 .../latest}/pipelines/test_pipeline_agents.py | 2 +- .../pipelines/test_pipeline_folders.py | 2 +- .../latest}/pipelines/test_pipeline_run.py | 4 +-- .../pipelines/test_pipeline_runs_artifacts.py | 2 +- .../latest}/pipelines/test_pipelines_build.py | 2 +- .../{test => tests/latest}/repos/__init__.py | 0 .../latest}/repos/test_import_request.py | 4 +-- .../latest}/repos/test_policy.py | 2 +- .../latest}/repos/test_pull_request.py | 4 +-- .../{test => tests/latest}/repos/test_ref.py | 4 +-- .../latest}/repos/test_repository.py | 4 +-- .../{test => tests/latest}/team/__init__.py | 0 .../latest}/team/test_configure.py | 2 +- .../latest}/team/test_extension.py | 2 +- .../latest}/team/test_feedback.py | 0 .../{test => tests/latest}/team/test_login.py | 2 +- .../latest}/team/test_security_group.py | 4 +-- .../latest}/team/test_security_permission.py | 4 +-- .../latest}/team/test_service_endpoint.py | 4 +-- .../{test => tests/latest}/team/test_team.py | 2 +- .../{test => tests/latest}/team/test_user.py | 2 +- .../azext_devops/tests/utils}/__init__.py | 2 -- .../{test => tests}/utils/authentication.py | 0 .../{test => tests}/utils/helper.py | 0 111 files changed, 111 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/released-version.yml rename azure-devops/azext_devops/{test => tests}/__init__.py (100%) rename azure-devops/azext_devops/{test => tests}/conftest.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/artifacts/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/artifacts/test_univeral.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/boards/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/boards/test_area.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/boards/test_boards_helper.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/boards/test_iteration.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/boards/test_workitem.py (97%) rename azure-devops/azext_devops/{test => tests/latest}/common/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_arguments.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_credentials.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_format.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_pip_helper.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_services.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_telemetry.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_uri.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_uuid.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/common/test_vsts_git_url_info.py (100%) rename azure-devops/azext_devops/{test/utils => tests/latest/integrationtests}/__init__.py (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_admin_banner_addUpdateShowListRemove.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_boards_areas.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_boards_iterations.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_boards_releations_create_remove.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_build_cancel.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_build_definition_listShow.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_build_listQueueShow.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_build_tag_listAddDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_devops_group_and_member_tests.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_devops_projects_CreateListShowDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_devops_security_permission_tests.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_devops_team_createUpdateShowListDeleteListMember.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_devops_user_command_addUpdateListShowRemove.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_extension_search.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_invoke_command_basic.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pipeline_create_and_variables_test.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pipeline_folders.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pipeline_pools_and_agents.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pipeline_queues.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pull_request_createUpdateVoteListAbandonReactivateCompleteReviewers.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_pull_request_policies_workitems.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_queryShow.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_ref_createDeleteFlow.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_ref_createListUpdateDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_repos_createListShowDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_repos_import_create.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_repos_policies_createUpdateShowListDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_variable_group.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_wiki_and_page_createListShowDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/recordings/test_workItemCreateShowUpdateDelete.yaml (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_adminBannerTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_boardsAreaTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_boardsIterationTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_boardsQueryTest.py (96%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_boardsRelationTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_boardsWorkItemTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_devopsProjectTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_devopsSecurityGroupTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_devopsSecurityPermissionTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_devopsTeamTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_devopsUserTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_extensionSearch.py (94%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_gitAliasTest.py (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_invoke.py (94%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelineAgentPoolQueueTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelineFoldersTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelinesBuildCancelTest.py (96%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelinesBuildDefinitionsTest.py (96%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelinesBuildTagTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelinesBuildTest.py (97%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_pipelinesCreateAndVariablesTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposImportTest.py (97%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposPoliciesTest.py (92%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposPrCommandsReviewersTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposPrPoliciesWorkItemsTest.py (91%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposRefDeleteFlowTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposRefTest.py (98%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_reposRepoTest.py (97%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_variableGroup.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/test_wikiAndPagesTest.py (99%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/utilities/__init__.py (100%) rename {tests => azure-devops/azext_devops/tests/latest/integrationtests}/utilities/helper.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/test_pipeline_agents.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/test_pipeline_folders.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/test_pipeline_run.py (95%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/test_pipeline_runs_artifacts.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/pipelines/test_pipelines_build.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/repos/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/repos/test_import_request.py (95%) rename azure-devops/azext_devops/{test => tests/latest}/repos/test_policy.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/repos/test_pull_request.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/repos/test_ref.py (97%) rename azure-devops/azext_devops/{test => tests/latest}/repos/test_repository.py (97%) rename azure-devops/azext_devops/{test => tests/latest}/team/__init__.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_configure.py (97%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_extension.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_feedback.py (100%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_login.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_security_group.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_security_permission.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_service_endpoint.py (98%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_team.py (99%) rename azure-devops/azext_devops/{test => tests/latest}/team/test_user.py (98%) rename {tests => azure-devops/azext_devops/tests/utils}/__init__.py (84%) rename azure-devops/azext_devops/{test => tests}/utils/authentication.py (100%) rename azure-devops/azext_devops/{test => tests}/utils/helper.py (100%) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index d6fb421b..c089c0e7 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -27,10 +27,10 @@ runs: - uses: ./.github/actions/download-install-local-azure-test-sdk - uses: ./.github/actions/setup-ci-machine - uses: ./.github/actions/download-install-local-azure-devops-cli-extension - - run: pytest --junitxml "TEST-results.xml" + - run: pytest --junitxml "TEST-results.xml" --ignore=azext_devops/tests/latest/integrationtests if: ${{ inputs.run-only-recorded-tests == 'false' }} shell: bash working-directory: azure-devops - - run: pytest tests --junitxml "TEST-results.xml" + - run: pytest tests --junitxml "TEST-results.xml" --ignore=azext_devops/tests/latest/integrationtests if: ${{ inputs.run-only-recorded-tests == 'true' }} shell: bash \ No newline at end of file diff --git a/.github/workflows/merge-workflow.yml b/.github/workflows/merge-workflow.yml index fd4b4d52..6860b952 100644 --- a/.github/workflows/merge-workflow.yml +++ b/.github/workflows/merge-workflow.yml @@ -120,7 +120,7 @@ jobs: - uses: ./.github/actions/setup-ci-machine - uses: ./.github/actions/download-install-local-azure-devops-cli-extension - name: Run unit tests for code coverage - run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html + run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html --ignore=azext_devops/tests/latest/integrationtests working-directory: 'azure-devops' - name: Install beautifulsoup4 run: pip install beautifulsoup4 diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml index 1708fc29..e22a4944 100644 --- a/.github/workflows/pr-workflow.yml +++ b/.github/workflows/pr-workflow.yml @@ -127,7 +127,7 @@ jobs: - uses: ./.github/actions/setup-ci-machine - uses: ./.github/actions/download-install-local-azure-devops-cli-extension - name: Run unit tests for code coverage - run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html + run: pytest --junitxml "TEST-UT-results.xml" --cov=azext_devops/dev --cov-report=xml --cov-report=html --ignore=azext_devops/tests/latest/integrationtests working-directory: 'azure-devops' - name: Install beautifulsoup4 run: pip install beautifulsoup4 diff --git a/.github/workflows/released-version.yml b/.github/workflows/released-version.yml new file mode 100644 index 00000000..f545d638 --- /dev/null +++ b/.github/workflows/released-version.yml @@ -0,0 +1,34 @@ +name: Released Version Workflow + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + Run_Test: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Set up virtual environment + run: | + python -m venv env + source env/bin/activate + pip install wheel==0.30.0 setuptools==70.0.0 + pip install azdev + azdev --version + azdev setup -r ./ -e azure-devops + azdev extension repo add . + azdev extension add azure-devops + azdev test azure-devops --live --no-exitfirst --series + env: + AZURE_DEVOPS_EXT_TEST_ORG: ${{ variables.AZURE_DEVOPS_EXT_TEST_ORG }} + AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZURE_DEVOPS_EXT_PAT }} + \ No newline at end of file diff --git a/azure-devops/azext_devops/test/__init__.py b/azure-devops/azext_devops/tests/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/__init__.py rename to azure-devops/azext_devops/tests/__init__.py diff --git a/azure-devops/azext_devops/test/conftest.py b/azure-devops/azext_devops/tests/conftest.py similarity index 100% rename from azure-devops/azext_devops/test/conftest.py rename to azure-devops/azext_devops/tests/conftest.py diff --git a/azure-devops/azext_devops/test/artifacts/__init__.py b/azure-devops/azext_devops/tests/latest/artifacts/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/artifacts/__init__.py rename to azure-devops/azext_devops/tests/latest/artifacts/__init__.py diff --git a/azure-devops/azext_devops/test/artifacts/test_univeral.py b/azure-devops/azext_devops/tests/latest/artifacts/test_univeral.py similarity index 100% rename from azure-devops/azext_devops/test/artifacts/test_univeral.py rename to azure-devops/azext_devops/tests/latest/artifacts/test_univeral.py diff --git a/azure-devops/azext_devops/test/boards/__init__.py b/azure-devops/azext_devops/tests/latest/boards/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/boards/__init__.py rename to azure-devops/azext_devops/tests/latest/boards/__init__.py diff --git a/azure-devops/azext_devops/test/boards/test_area.py b/azure-devops/azext_devops/tests/latest/boards/test_area.py similarity index 99% rename from azure-devops/azext_devops/test/boards/test_area.py rename to azure-devops/azext_devops/tests/latest/boards/test_area.py index ae9f5a11..b3b07a78 100644 --- a/azure-devops/azext_devops/test/boards/test_area.py +++ b/azure-devops/azext_devops/tests/latest/boards/test_area.py @@ -15,8 +15,8 @@ from azext_devops.devops_sdk.v5_0.work.models import (TeamFieldValue, TeamFieldValuesPatch) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper from azext_devops.dev.boards.area import (get_project_areas, get_project_area, delete_project_area, diff --git a/azure-devops/azext_devops/test/boards/test_boards_helper.py b/azure-devops/azext_devops/tests/latest/boards/test_boards_helper.py similarity index 100% rename from azure-devops/azext_devops/test/boards/test_boards_helper.py rename to azure-devops/azext_devops/tests/latest/boards/test_boards_helper.py diff --git a/azure-devops/azext_devops/test/boards/test_iteration.py b/azure-devops/azext_devops/tests/latest/boards/test_iteration.py similarity index 99% rename from azure-devops/azext_devops/test/boards/test_iteration.py rename to azure-devops/azext_devops/tests/latest/boards/test_iteration.py index 6581b31a..f5cfbce2 100644 --- a/azure-devops/azext_devops/test/boards/test_iteration.py +++ b/azure-devops/azext_devops/tests/latest/boards/test_iteration.py @@ -13,8 +13,8 @@ from mock import patch from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper from azext_devops.dev.boards.iteration import (get_project_iterations, get_project_iteration, delete_project_iteration, diff --git a/azure-devops/azext_devops/test/boards/test_workitem.py b/azure-devops/azext_devops/tests/latest/boards/test_workitem.py similarity index 97% rename from azure-devops/azext_devops/test/boards/test_workitem.py rename to azure-devops/azext_devops/tests/latest/boards/test_workitem.py index 5f3f17a0..1ef9b152 100644 --- a/azure-devops/azext_devops/test/boards/test_workitem.py +++ b/azure-devops/azext_devops/tests/latest/boards/test_workitem.py @@ -15,8 +15,8 @@ from azext_devops.dev.boards.work_item import (delete_work_item, show_work_item) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL +from azext_devops.tests.utils.authentication import AuthenticatedTests class TestWorkItemMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/common/__init__.py b/azure-devops/azext_devops/tests/latest/common/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/common/__init__.py rename to azure-devops/azext_devops/tests/latest/common/__init__.py diff --git a/azure-devops/azext_devops/test/common/test_arguments.py b/azure-devops/azext_devops/tests/latest/common/test_arguments.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_arguments.py rename to azure-devops/azext_devops/tests/latest/common/test_arguments.py diff --git a/azure-devops/azext_devops/test/common/test_credentials.py b/azure-devops/azext_devops/tests/latest/common/test_credentials.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_credentials.py rename to azure-devops/azext_devops/tests/latest/common/test_credentials.py diff --git a/azure-devops/azext_devops/test/common/test_format.py b/azure-devops/azext_devops/tests/latest/common/test_format.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_format.py rename to azure-devops/azext_devops/tests/latest/common/test_format.py diff --git a/azure-devops/azext_devops/test/common/test_pip_helper.py b/azure-devops/azext_devops/tests/latest/common/test_pip_helper.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_pip_helper.py rename to azure-devops/azext_devops/tests/latest/common/test_pip_helper.py diff --git a/azure-devops/azext_devops/test/common/test_services.py b/azure-devops/azext_devops/tests/latest/common/test_services.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_services.py rename to azure-devops/azext_devops/tests/latest/common/test_services.py diff --git a/azure-devops/azext_devops/test/common/test_telemetry.py b/azure-devops/azext_devops/tests/latest/common/test_telemetry.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_telemetry.py rename to azure-devops/azext_devops/tests/latest/common/test_telemetry.py diff --git a/azure-devops/azext_devops/test/common/test_uri.py b/azure-devops/azext_devops/tests/latest/common/test_uri.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_uri.py rename to azure-devops/azext_devops/tests/latest/common/test_uri.py diff --git a/azure-devops/azext_devops/test/common/test_uuid.py b/azure-devops/azext_devops/tests/latest/common/test_uuid.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_uuid.py rename to azure-devops/azext_devops/tests/latest/common/test_uuid.py diff --git a/azure-devops/azext_devops/test/common/test_vsts_git_url_info.py b/azure-devops/azext_devops/tests/latest/common/test_vsts_git_url_info.py similarity index 100% rename from azure-devops/azext_devops/test/common/test_vsts_git_url_info.py rename to azure-devops/azext_devops/tests/latest/common/test_vsts_git_url_info.py diff --git a/azure-devops/azext_devops/test/utils/__init__.py b/azure-devops/azext_devops/tests/latest/integrationtests/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/utils/__init__.py rename to azure-devops/azext_devops/tests/latest/integrationtests/__init__.py diff --git a/tests/recordings/test_admin_banner_addUpdateShowListRemove.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_admin_banner_addUpdateShowListRemove.yaml similarity index 100% rename from tests/recordings/test_admin_banner_addUpdateShowListRemove.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_admin_banner_addUpdateShowListRemove.yaml diff --git a/tests/recordings/test_boards_areas.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_areas.yaml similarity index 100% rename from tests/recordings/test_boards_areas.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_areas.yaml diff --git a/tests/recordings/test_boards_iterations.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_iterations.yaml similarity index 100% rename from tests/recordings/test_boards_iterations.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_iterations.yaml diff --git a/tests/recordings/test_boards_releations_create_remove.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_releations_create_remove.yaml similarity index 100% rename from tests/recordings/test_boards_releations_create_remove.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_boards_releations_create_remove.yaml diff --git a/tests/recordings/test_build_cancel.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_cancel.yaml similarity index 100% rename from tests/recordings/test_build_cancel.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_cancel.yaml diff --git a/tests/recordings/test_build_definition_listShow.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_definition_listShow.yaml similarity index 100% rename from tests/recordings/test_build_definition_listShow.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_definition_listShow.yaml diff --git a/tests/recordings/test_build_listQueueShow.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_listQueueShow.yaml similarity index 100% rename from tests/recordings/test_build_listQueueShow.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_listQueueShow.yaml diff --git a/tests/recordings/test_build_tag_listAddDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_tag_listAddDelete.yaml similarity index 100% rename from tests/recordings/test_build_tag_listAddDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_build_tag_listAddDelete.yaml diff --git a/tests/recordings/test_devops_group_and_member_tests.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_group_and_member_tests.yaml similarity index 100% rename from tests/recordings/test_devops_group_and_member_tests.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_group_and_member_tests.yaml diff --git a/tests/recordings/test_devops_projects_CreateListShowDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_projects_CreateListShowDelete.yaml similarity index 100% rename from tests/recordings/test_devops_projects_CreateListShowDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_projects_CreateListShowDelete.yaml diff --git a/tests/recordings/test_devops_security_permission_tests.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_security_permission_tests.yaml similarity index 100% rename from tests/recordings/test_devops_security_permission_tests.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_security_permission_tests.yaml diff --git a/tests/recordings/test_devops_team_createUpdateShowListDeleteListMember.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_team_createUpdateShowListDeleteListMember.yaml similarity index 100% rename from tests/recordings/test_devops_team_createUpdateShowListDeleteListMember.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_team_createUpdateShowListDeleteListMember.yaml diff --git a/tests/recordings/test_devops_user_command_addUpdateListShowRemove.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_user_command_addUpdateListShowRemove.yaml similarity index 100% rename from tests/recordings/test_devops_user_command_addUpdateListShowRemove.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_devops_user_command_addUpdateListShowRemove.yaml diff --git a/tests/recordings/test_extension_search.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_extension_search.yaml similarity index 100% rename from tests/recordings/test_extension_search.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_extension_search.yaml diff --git a/tests/recordings/test_invoke_command_basic.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_invoke_command_basic.yaml similarity index 100% rename from tests/recordings/test_invoke_command_basic.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_invoke_command_basic.yaml diff --git a/tests/recordings/test_pipeline_create_and_variables_test.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_create_and_variables_test.yaml similarity index 100% rename from tests/recordings/test_pipeline_create_and_variables_test.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_create_and_variables_test.yaml diff --git a/tests/recordings/test_pipeline_folders.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_folders.yaml similarity index 100% rename from tests/recordings/test_pipeline_folders.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_folders.yaml diff --git a/tests/recordings/test_pipeline_pools_and_agents.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_pools_and_agents.yaml similarity index 100% rename from tests/recordings/test_pipeline_pools_and_agents.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_pools_and_agents.yaml diff --git a/tests/recordings/test_pipeline_queues.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_queues.yaml similarity index 100% rename from tests/recordings/test_pipeline_queues.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pipeline_queues.yaml diff --git a/tests/recordings/test_pull_request_createUpdateVoteListAbandonReactivateCompleteReviewers.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pull_request_createUpdateVoteListAbandonReactivateCompleteReviewers.yaml similarity index 100% rename from tests/recordings/test_pull_request_createUpdateVoteListAbandonReactivateCompleteReviewers.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pull_request_createUpdateVoteListAbandonReactivateCompleteReviewers.yaml diff --git a/tests/recordings/test_pull_request_policies_workitems.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pull_request_policies_workitems.yaml similarity index 100% rename from tests/recordings/test_pull_request_policies_workitems.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_pull_request_policies_workitems.yaml diff --git a/tests/recordings/test_queryShow.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_queryShow.yaml similarity index 100% rename from tests/recordings/test_queryShow.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_queryShow.yaml diff --git a/tests/recordings/test_ref_createDeleteFlow.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_ref_createDeleteFlow.yaml similarity index 100% rename from tests/recordings/test_ref_createDeleteFlow.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_ref_createDeleteFlow.yaml diff --git a/tests/recordings/test_ref_createListUpdateDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_ref_createListUpdateDelete.yaml similarity index 100% rename from tests/recordings/test_ref_createListUpdateDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_ref_createListUpdateDelete.yaml diff --git a/tests/recordings/test_repos_createListShowDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_createListShowDelete.yaml similarity index 100% rename from tests/recordings/test_repos_createListShowDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_createListShowDelete.yaml diff --git a/tests/recordings/test_repos_import_create.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_import_create.yaml similarity index 100% rename from tests/recordings/test_repos_import_create.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_import_create.yaml diff --git a/tests/recordings/test_repos_policies_createUpdateShowListDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_policies_createUpdateShowListDelete.yaml similarity index 100% rename from tests/recordings/test_repos_policies_createUpdateShowListDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_repos_policies_createUpdateShowListDelete.yaml diff --git a/tests/recordings/test_variable_group.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_variable_group.yaml similarity index 100% rename from tests/recordings/test_variable_group.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_variable_group.yaml diff --git a/tests/recordings/test_wiki_and_page_createListShowDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_wiki_and_page_createListShowDelete.yaml similarity index 100% rename from tests/recordings/test_wiki_and_page_createListShowDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_wiki_and_page_createListShowDelete.yaml diff --git a/tests/recordings/test_workItemCreateShowUpdateDelete.yaml b/azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_workItemCreateShowUpdateDelete.yaml similarity index 100% rename from tests/recordings/test_workItemCreateShowUpdateDelete.yaml rename to azure-devops/azext_devops/tests/latest/integrationtests/recordings/test_workItemCreateShowUpdateDelete.yaml diff --git a/tests/test_adminBannerTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_adminBannerTest.py similarity index 98% rename from tests/test_adminBannerTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_adminBannerTest.py index dea68a6e..b8c359c5 100644 --- a/tests/test_adminBannerTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_adminBannerTest.py @@ -7,7 +7,7 @@ import unittest from datetime import datetime -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_boardsAreaTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsAreaTest.py similarity index 99% rename from tests/test_boardsAreaTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_boardsAreaTest.py index 07f2f120..b7d9253d 100644 --- a/tests/test_boardsAreaTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsAreaTest.py @@ -6,7 +6,7 @@ import unittest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/ishitamehta' diff --git a/tests/test_boardsIterationTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsIterationTest.py similarity index 99% rename from tests/test_boardsIterationTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_boardsIterationTest.py index 9d3e63b4..6500078d 100644 --- a/tests/test_boardsIterationTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsIterationTest.py @@ -6,7 +6,7 @@ import unittest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_boardsQueryTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsQueryTest.py similarity index 96% rename from tests/test_boardsQueryTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_boardsQueryTest.py index c4909a8a..52011657 100644 --- a/tests/test_boardsQueryTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsQueryTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_boardsRelationTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsRelationTest.py similarity index 98% rename from tests/test_boardsRelationTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_boardsRelationTest.py index 9ecda045..75fdf7f9 100644 --- a/tests/test_boardsRelationTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsRelationTest.py @@ -5,7 +5,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_boardsWorkItemTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsWorkItemTest.py similarity index 98% rename from tests/test_boardsWorkItemTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_boardsWorkItemTest.py index 2bfb8926..c18b84c8 100644 --- a/tests/test_boardsWorkItemTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_boardsWorkItemTest.py @@ -8,7 +8,7 @@ import pytest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_devopsProjectTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsProjectTest.py similarity index 98% rename from tests/test_devopsProjectTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_devopsProjectTest.py index 87a2d762..d3ee31e4 100644 --- a/tests/test_devopsProjectTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsProjectTest.py @@ -7,7 +7,7 @@ import unittest import json -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_devopsSecurityGroupTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityGroupTest.py similarity index 99% rename from tests/test_devopsSecurityGroupTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityGroupTest.py index a7ce37cd..f99bc486 100644 --- a/tests/test_devopsSecurityGroupTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityGroupTest.py @@ -5,7 +5,7 @@ import unittest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_devopsSecurityPermissionTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityPermissionTest.py similarity index 99% rename from tests/test_devopsSecurityPermissionTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityPermissionTest.py index 42659da8..e32af328 100644 --- a/tests/test_devopsSecurityPermissionTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsSecurityPermissionTest.py @@ -5,7 +5,7 @@ import unittest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_devopsTeamTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsTeamTest.py similarity index 98% rename from tests/test_devopsTeamTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_devopsTeamTest.py index 59c83e19..c4611e58 100644 --- a/tests/test_devopsTeamTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsTeamTest.py @@ -5,7 +5,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_devopsUserTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsUserTest.py similarity index 98% rename from tests/test_devopsUserTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_devopsUserTest.py index 29362afc..4eafc05e 100644 --- a/tests/test_devopsUserTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_devopsUserTest.py @@ -5,7 +5,7 @@ import unittest from knack.util import CLIError -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_extensionSearch.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_extensionSearch.py similarity index 94% rename from tests/test_extensionSearch.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_extensionSearch.py index 398bdc05..b520a143 100644 --- a/tests/test_extensionSearch.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_extensionSearch.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry class ExtensionSearchTest(DevopsScenarioTest): diff --git a/tests/test_gitAliasTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_gitAliasTest.py similarity index 100% rename from tests/test_gitAliasTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_gitAliasTest.py diff --git a/tests/test_invoke.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_invoke.py similarity index 94% rename from tests/test_invoke.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_invoke.py index 19d2fd0a..d9f60cb2 100644 --- a/tests/test_invoke.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_invoke.py @@ -5,7 +5,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_pipelineAgentPoolQueueTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineAgentPoolQueueTest.py similarity index 98% rename from tests/test_pipelineAgentPoolQueueTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineAgentPoolQueueTest.py index e8d22cba..981f17ce 100644 --- a/tests/test_pipelineAgentPoolQueueTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineAgentPoolQueueTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_pipelineFoldersTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineFoldersTest.py similarity index 98% rename from tests/test_pipelineFoldersTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineFoldersTest.py index 1d886a7c..4027ad43 100644 --- a/tests/test_pipelineFoldersTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelineFoldersTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_pipelinesBuildCancelTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildCancelTest.py similarity index 96% rename from tests/test_pipelinesBuildCancelTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildCancelTest.py index 8b931835..481f15c1 100644 --- a/tests/test_pipelinesBuildCancelTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildCancelTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/dhilmathy' diff --git a/tests/test_pipelinesBuildDefinitionsTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildDefinitionsTest.py similarity index 96% rename from tests/test_pipelinesBuildDefinitionsTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildDefinitionsTest.py index 6eea32b7..a5e07cb2 100644 --- a/tests/test_pipelinesBuildDefinitionsTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildDefinitionsTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_pipelinesBuildTagTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTagTest.py similarity index 98% rename from tests/test_pipelinesBuildTagTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTagTest.py index 0202b86c..2bfcd7b3 100644 --- a/tests/test_pipelinesBuildTagTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTagTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_pipelinesBuildTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTest.py similarity index 97% rename from tests/test_pipelinesBuildTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTest.py index a9ceef07..b7a99f63 100644 --- a/tests/test_pipelinesBuildTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesBuildTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_pipelinesCreateAndVariablesTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesCreateAndVariablesTest.py similarity index 99% rename from tests/test_pipelinesCreateAndVariablesTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesCreateAndVariablesTest.py index 972ea36c..16015362 100644 --- a/tests/test_pipelinesCreateAndVariablesTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_pipelinesCreateAndVariablesTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_reposImportTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposImportTest.py similarity index 97% rename from tests/test_reposImportTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposImportTest.py index 021c7a8b..efb0439b 100644 --- a/tests/test_reposImportTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposImportTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable, get_random_name DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/v-anvashist0376' diff --git a/tests/test_reposPoliciesTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPoliciesTest.py similarity index 92% rename from tests/test_reposPoliciesTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposPoliciesTest.py index 11972cbd..75eb3917 100644 --- a/tests/test_reposPoliciesTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPoliciesTest.py @@ -5,7 +5,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' @@ -53,7 +53,7 @@ def test_repos_policies_createUpdateShowListDelete(self): show_policy_output = self.cmd(show_policy_command).get_output_in_json() assert show_policy_output["id"] == policy_id assert show_policy_output["type"]["id"] == 'fa4e907d-c16b-4a4c-9dfa-4916e5d171ab' #id of merge strategy policy - self.failUnlessRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) + self.assertRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) update_policy_command = 'az repos policy merge-strategy update --id ' + str(policy_id) + ' --use-squash-merge True --output json --detect false' update_policy_output = self.cmd(update_policy_command).get_output_in_json() @@ -74,8 +74,8 @@ def test_repos_policies_createUpdateShowListDelete(self): self.sleep_in_live_run(5) show_policy_output = self.cmd(show_policy_command).get_output_in_json() - self.failUnlessRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) - self.failUnlessRaises(KeyError, lambda: show_policy_output["settings"]["allowSquash"]) + self.assertRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) + self.assertRaises(KeyError, lambda: show_policy_output["settings"]["allowSquash"]) assert show_policy_output["settings"]["allowRebase"] == True delete_policy_command = 'az repos policy delete --id ' + str(policy_id) + ' -p ' + created_project_id + ' --output json --detect false -y' @@ -103,8 +103,8 @@ def test_repos_policies_createUpdateShowListDelete(self): show_policy_command = 'az repos policy show --id ' + str(policy_id) + ' -p ' + created_project_id + ' --output json --detect false' show_policy_output = self.cmd(show_policy_command).get_output_in_json() - self.failUnlessRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) - self.failUnlessRaises(KeyError, lambda: show_policy_output["settings"]["allowRebase"]) + self.assertRaises(KeyError, lambda: show_policy_output["settings"]["useSquashMerge"]) + self.assertRaises(KeyError, lambda: show_policy_output["settings"]["allowRebase"]) assert show_policy_output["settings"]["allowSquash"] == True assert show_policy_output["settings"]["allowRebaseMerge"] == True diff --git a/tests/test_reposPrCommandsReviewersTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrCommandsReviewersTest.py similarity index 99% rename from tests/test_reposPrCommandsReviewersTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrCommandsReviewersTest.py index 720c6724..9494f1d4 100644 --- a/tests/test_reposPrCommandsReviewersTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrCommandsReviewersTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from dateutil import parser from .utilities.helper import ( DevopsScenarioTest, get_random_name, disable_telemetry, set_authentication, get_test_org_from_env_variable) diff --git a/tests/test_reposPrPoliciesWorkItemsTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrPoliciesWorkItemsTest.py similarity index 91% rename from tests/test_reposPrPoliciesWorkItemsTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrPoliciesWorkItemsTest.py index acb224d1..c6343a05 100644 --- a/tests/test_reposPrPoliciesWorkItemsTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposPrPoliciesWorkItemsTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from datetime import datetime from .utilities.helper import ( DevopsScenarioTest, get_random_name, disable_telemetry, set_authentication, get_test_org_from_env_variable) @@ -18,8 +18,8 @@ class AzReposPrPolicyTests(DevopsScenarioTest): @disable_telemetry @set_authentication def test_pull_request_policies_workitems(self): - self.cmd('az devops configure --defaults organization=' + DEVOPS_CLI_TEST_ORGANIZATION) - + self.cmd('az devops configure --defaults organization=' + DEVOPS_CLI_TEST_ORGANIZATION) + #List PR pr_list = self.cmd('az repos pr list --project PullRequestLiveTest --repository PullRequestLiveTest --detect false --output json', checks=[ self.check("[0].description", 'Updated README.md'), @@ -27,8 +27,8 @@ def test_pull_request_policies_workitems(self): ]).get_output_in_json() assert len(pr_list) > 0 - pr_id_to_query = pr_list[1]["pullRequestId"] - + pr_id_to_query = pr_list[1]["pullRequestId"] + #PR Policies list command list_pr_policies_command = 'az repos pr policy list --id ' + str(pr_id_to_query) + ' --detect false --output json' list_pr_policies_output = self.cmd(list_pr_policies_command).get_output_in_json() @@ -44,8 +44,8 @@ def test_pull_request_policies_workitems(self): assert queue_pr_policy_output["status"] == 'queued' #PR work-item add command - work_item_ids_to_add = '1 2' - work_item_id_to_remove = '2' + work_item_ids_to_add = '129 130' + work_item_id_to_remove = '130' add_wit_pr_command = ('az repos pr work-item add --id ' + str(pr_id_to_query) + ' --work-items ' + work_item_ids_to_add + ' --detect false --output json') @@ -63,7 +63,7 @@ def test_pull_request_policies_workitems(self): self.cmd(remove_wit_pr_command) #verify removed list_wit_pr_output = self.cmd(list_wit_pr_command, checks=[ - self.check("[0].id", "1") + self.check("[0].id", "129") ]).get_output_in_json() assert len(list_wit_pr_output) == 1 diff --git a/tests/test_reposRefDeleteFlowTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefDeleteFlowTest.py similarity index 98% rename from tests/test_reposRefDeleteFlowTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefDeleteFlowTest.py index 727ef643..746675a1 100644 --- a/tests/test_reposRefDeleteFlowTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefDeleteFlowTest.py @@ -5,7 +5,7 @@ import os -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import (DevopsScenarioTest, disable_telemetry, get_random_name, diff --git a/tests/test_reposRefTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefTest.py similarity index 98% rename from tests/test_reposRefTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefTest.py index 8b1b0d31..bc1330ac 100644 --- a/tests/test_reposRefTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRefTest.py @@ -5,7 +5,7 @@ import os -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import (DevopsScenarioTest, disable_telemetry, get_random_name, diff --git a/tests/test_reposRepoTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRepoTest.py similarity index 97% rename from tests/test_reposRepoTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_reposRepoTest.py index 204acfb8..eb0122da 100644 --- a/tests/test_reposRepoTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_reposRepoTest.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import ( DevopsScenarioTest, get_random_name, disable_telemetry, set_authentication, get_test_org_from_env_variable) diff --git a/tests/test_variableGroup.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_variableGroup.py similarity index 99% rename from tests/test_variableGroup.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_variableGroup.py index d19d1c7d..df26945a 100644 --- a/tests/test_variableGroup.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_variableGroup.py @@ -6,7 +6,7 @@ import os import unittest -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import DevopsScenarioTest, disable_telemetry, set_authentication, get_test_org_from_env_variable DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/azuredevopsclitest' diff --git a/tests/test_wikiAndPagesTest.py b/azure-devops/azext_devops/tests/latest/integrationtests/test_wikiAndPagesTest.py similarity index 99% rename from tests/test_wikiAndPagesTest.py rename to azure-devops/azext_devops/tests/latest/integrationtests/test_wikiAndPagesTest.py index 592e43cd..cb2198c3 100644 --- a/tests/test_wikiAndPagesTest.py +++ b/azure-devops/azext_devops/tests/latest/integrationtests/test_wikiAndPagesTest.py @@ -5,7 +5,7 @@ import os -from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse from .utilities.helper import (DevopsScenarioTest, disable_telemetry, get_random_name, diff --git a/tests/utilities/__init__.py b/azure-devops/azext_devops/tests/latest/integrationtests/utilities/__init__.py similarity index 100% rename from tests/utilities/__init__.py rename to azure-devops/azext_devops/tests/latest/integrationtests/utilities/__init__.py diff --git a/tests/utilities/helper.py b/azure-devops/azext_devops/tests/latest/integrationtests/utilities/helper.py similarity index 100% rename from tests/utilities/helper.py rename to azure-devops/azext_devops/tests/latest/integrationtests/utilities/helper.py diff --git a/azure-devops/azext_devops/test/pipelines/__init__.py b/azure-devops/azext_devops/tests/latest/pipelines/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/pipelines/__init__.py rename to azure-devops/azext_devops/tests/latest/pipelines/__init__.py diff --git a/azure-devops/azext_devops/test/pipelines/test_pipeline_agents.py b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_agents.py similarity index 99% rename from azure-devops/azext_devops/test/pipelines/test_pipeline_agents.py rename to azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_agents.py index bce2d634..1cac1f68 100644 --- a/azure-devops/azext_devops/test/pipelines/test_pipeline_agents.py +++ b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_agents.py @@ -13,7 +13,7 @@ from mock import patch from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.devops_sdk.v5_1.task_agent.task_agent_client import TaskAgentClient from azext_devops.dev.pipelines.agent_pool_queue import list_pools, show_pool, list_agents, show_agent, list_queues, show_queue diff --git a/azure-devops/azext_devops/test/pipelines/test_pipeline_folders.py b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_folders.py similarity index 98% rename from azure-devops/azext_devops/test/pipelines/test_pipeline_folders.py rename to azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_folders.py index 544256ca..597781f5 100644 --- a/azure-devops/azext_devops/test/pipelines/test_pipeline_folders.py +++ b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_folders.py @@ -13,7 +13,7 @@ from mock import patch from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.dev.pipelines.pipeline_folders import (pipeline_folder_create, pipeline_folder_delete, pipeline_folder_list, diff --git a/azure-devops/azext_devops/test/pipelines/test_pipeline_run.py b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_run.py similarity index 95% rename from azure-devops/azext_devops/test/pipelines/test_pipeline_run.py rename to azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_run.py index b3ee2715..961fb03e 100644 --- a/azure-devops/azext_devops/test/pipelines/test_pipeline_run.py +++ b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_run.py @@ -13,12 +13,12 @@ from mock import patch from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.devops_sdk.v5_0.build.build_client import BuildClient from azext_devops.devops_sdk.v6_0.pipelines.pipelines_client import PipelinesClient from azext_devops.dev.pipelines.pipeline import pipeline_run -from azext_devops.test.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL +from azext_devops.tests.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL class TestPipelinesRun(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/pipelines/test_pipeline_runs_artifacts.py b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_runs_artifacts.py similarity index 98% rename from azure-devops/azext_devops/test/pipelines/test_pipeline_runs_artifacts.py rename to azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_runs_artifacts.py index 5678c4d5..ff1889f4 100644 --- a/azure-devops/azext_devops/test/pipelines/test_pipeline_runs_artifacts.py +++ b/azure-devops/azext_devops/tests/latest/pipelines/test_pipeline_runs_artifacts.py @@ -14,7 +14,7 @@ from azext_devops.dev.pipelines.runs_artifacts import run_artifact_download, run_artifact_upload, run_artifact_list from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.devops_sdk.v5_0.build.build_client import BuildClient from azext_devops.dev.common.const import ARTIFACTTOOL_PAT_ENVKEY diff --git a/azure-devops/azext_devops/test/pipelines/test_pipelines_build.py b/azure-devops/azext_devops/tests/latest/pipelines/test_pipelines_build.py similarity index 98% rename from azure-devops/azext_devops/test/pipelines/test_pipelines_build.py rename to azure-devops/azext_devops/tests/latest/pipelines/test_pipelines_build.py index 49e78265..ff939a93 100644 --- a/azure-devops/azext_devops/test/pipelines/test_pipelines_build.py +++ b/azure-devops/azext_devops/tests/latest/pipelines/test_pipelines_build.py @@ -14,7 +14,7 @@ from azext_devops.dev.pipelines.build import (build_show) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.devops_sdk.v5_0.build.build_client import BuildClient diff --git a/azure-devops/azext_devops/test/repos/__init__.py b/azure-devops/azext_devops/tests/latest/repos/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/repos/__init__.py rename to azure-devops/azext_devops/tests/latest/repos/__init__.py diff --git a/azure-devops/azext_devops/test/repos/test_import_request.py b/azure-devops/azext_devops/tests/latest/repos/test_import_request.py similarity index 95% rename from azure-devops/azext_devops/test/repos/test_import_request.py rename to azure-devops/azext_devops/tests/latest/repos/test_import_request.py index 3db3b200..f3730ac1 100644 --- a/azure-devops/azext_devops/test/repos/test_import_request.py +++ b/azure-devops/azext_devops/tests/latest/repos/test_import_request.py @@ -20,8 +20,8 @@ from azext_devops.dev.repos.import_request import create_import_request from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper class TestImportRepositoryMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/repos/test_policy.py b/azure-devops/azext_devops/tests/latest/repos/test_policy.py similarity index 99% rename from azure-devops/azext_devops/test/repos/test_policy.py rename to azure-devops/azext_devops/tests/latest/repos/test_policy.py index e33d4a64..a702bbc8 100644 --- a/azure-devops/azext_devops/test/repos/test_policy.py +++ b/azure-devops/azext_devops/tests/latest/repos/test_policy.py @@ -15,7 +15,7 @@ from azext_devops.dev.repos.policy import * from azext_devops.devops_sdk.v5_0.policy.models import PolicyConfiguration, PolicyTypeRef from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.devops_sdk.v5_0.policy.policy_client import PolicyClient diff --git a/azure-devops/azext_devops/test/repos/test_pull_request.py b/azure-devops/azext_devops/tests/latest/repos/test_pull_request.py similarity index 99% rename from azure-devops/azext_devops/test/repos/test_pull_request.py rename to azure-devops/azext_devops/tests/latest/repos/test_pull_request.py index d0fd94c9..45f908df 100644 --- a/azure-devops/azext_devops/test/repos/test_pull_request.py +++ b/azure-devops/azext_devops/tests/latest/repos/test_pull_request.py @@ -30,8 +30,8 @@ from azext_devops.dev.common.git import get_current_branch_name, resolve_git_ref_heads from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL class TestPullRequestMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/repos/test_ref.py b/azure-devops/azext_devops/tests/latest/repos/test_ref.py similarity index 97% rename from azure-devops/azext_devops/test/repos/test_ref.py rename to azure-devops/azext_devops/tests/latest/repos/test_ref.py index 65718cd2..6afeb427 100644 --- a/azure-devops/azext_devops/test/repos/test_ref.py +++ b/azure-devops/azext_devops/tests/latest/repos/test_ref.py @@ -17,8 +17,8 @@ from azext_devops.devops_sdk.v5_0.git.git_client import GitClient from azext_devops.dev.common.services import clear_connection_cache from azext_devops.dev.repos.ref import (list_refs, create_ref, delete_ref, lock_ref, unlock_ref) -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper, TEST_DEVOPS_ORG_URL class MockRef(object): def __init__(self, object_id): diff --git a/azure-devops/azext_devops/test/repos/test_repository.py b/azure-devops/azext_devops/tests/latest/repos/test_repository.py similarity index 97% rename from azure-devops/azext_devops/test/repos/test_repository.py rename to azure-devops/azext_devops/tests/latest/repos/test_repository.py index fd6574fa..f901ea82 100644 --- a/azure-devops/azext_devops/test/repos/test_repository.py +++ b/azure-devops/azext_devops/tests/latest/repos/test_repository.py @@ -20,8 +20,8 @@ update_repo) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper class TestRepositoryMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/team/__init__.py b/azure-devops/azext_devops/tests/latest/team/__init__.py similarity index 100% rename from azure-devops/azext_devops/test/team/__init__.py rename to azure-devops/azext_devops/tests/latest/team/__init__.py diff --git a/azure-devops/azext_devops/test/team/test_configure.py b/azure-devops/azext_devops/tests/latest/team/test_configure.py similarity index 97% rename from azure-devops/azext_devops/test/team/test_configure.py rename to azure-devops/azext_devops/tests/latest/team/test_configure.py index ff0cd004..487646f4 100644 --- a/azure-devops/azext_devops/test/team/test_configure.py +++ b/azure-devops/azext_devops/tests/latest/team/test_configure.py @@ -12,7 +12,7 @@ from mock import patch from azext_devops.dev.common.const import DEFAULTS_SECTION from azext_devops.dev.team.configure import print_current_configuration, configure -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests from azext_devops.dev.common.services import clear_connection_cache class TestConfigureMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/team/test_extension.py b/azure-devops/azext_devops/tests/latest/team/test_extension.py similarity index 99% rename from azure-devops/azext_devops/test/team/test_extension.py rename to azure-devops/azext_devops/tests/latest/team/test_extension.py index 21e8f05c..2ff702ff 100644 --- a/azure-devops/azext_devops/test/team/test_extension.py +++ b/azure-devops/azext_devops/tests/latest/team/test_extension.py @@ -21,7 +21,7 @@ disable_extension) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests class MockInstalledExtension(object): def __init__(self, flags, install_state=None): diff --git a/azure-devops/azext_devops/test/team/test_feedback.py b/azure-devops/azext_devops/tests/latest/team/test_feedback.py similarity index 100% rename from azure-devops/azext_devops/test/team/test_feedback.py rename to azure-devops/azext_devops/tests/latest/team/test_feedback.py diff --git a/azure-devops/azext_devops/test/team/test_login.py b/azure-devops/azext_devops/tests/latest/team/test_login.py similarity index 98% rename from azure-devops/azext_devops/test/team/test_login.py rename to azure-devops/azext_devops/tests/latest/team/test_login.py index 93ed5cac..24dc5302 100644 --- a/azure-devops/azext_devops/test/team/test_login.py +++ b/azure-devops/azext_devops/tests/latest/team/test_login.py @@ -15,7 +15,7 @@ from azext_devops.dev.team.credentials import credential_set, credential_clear from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests class TestLoginLogoutMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/team/test_security_group.py b/azure-devops/azext_devops/tests/latest/team/test_security_group.py similarity index 98% rename from azure-devops/azext_devops/test/team/test_security_group.py rename to azure-devops/azext_devops/tests/latest/team/test_security_group.py index 3f8c8b95..71208f7c 100644 --- a/azure-devops/azext_devops/test/team/test_security_group.py +++ b/azure-devops/azext_devops/tests/latest/team/test_security_group.py @@ -23,8 +23,8 @@ list_memberships) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper class TestSecurityGroupMethods(AuthenticatedTests): _TEST_DEVOPS_ORGANIZATION = 'https://someorganization.visualstudio.com' diff --git a/azure-devops/azext_devops/test/team/test_security_permission.py b/azure-devops/azext_devops/tests/latest/team/test_security_permission.py similarity index 98% rename from azure-devops/azext_devops/test/team/test_security_permission.py rename to azure-devops/azext_devops/tests/latest/team/test_security_permission.py index 8e4ca2f2..81dfcef9 100644 --- a/azure-devops/azext_devops/test/team/test_security_permission.py +++ b/azure-devops/azext_devops/tests/latest/team/test_security_permission.py @@ -28,8 +28,8 @@ _resolve_bits) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper class TestSecurityPermissionsMethods(AuthenticatedTests): _TEST_DEVOPS_ORGANIZATION = 'https://someorganization.visualstudio.com' diff --git a/azure-devops/azext_devops/test/team/test_service_endpoint.py b/azure-devops/azext_devops/tests/latest/team/test_service_endpoint.py similarity index 98% rename from azure-devops/azext_devops/test/team/test_service_endpoint.py rename to azure-devops/azext_devops/tests/latest/team/test_service_endpoint.py index fb093c87..5fa73ff9 100644 --- a/azure-devops/azext_devops/test/team/test_service_endpoint.py +++ b/azure-devops/azext_devops/tests/latest/team/test_service_endpoint.py @@ -23,8 +23,8 @@ update_service_endpoint) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests -from azext_devops.test.utils.helper import get_client_mock_helper +from azext_devops.tests.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.helper import get_client_mock_helper class TestServiceEndpointMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/team/test_team.py b/azure-devops/azext_devops/tests/latest/team/test_team.py similarity index 99% rename from azure-devops/azext_devops/test/team/test_team.py rename to azure-devops/azext_devops/tests/latest/team/test_team.py index 3c332d6b..5062ca30 100644 --- a/azure-devops/azext_devops/test/team/test_team.py +++ b/azure-devops/azext_devops/tests/latest/team/test_team.py @@ -21,7 +21,7 @@ update_team) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests class TestTeamMethods(AuthenticatedTests): diff --git a/azure-devops/azext_devops/test/team/test_user.py b/azure-devops/azext_devops/tests/latest/team/test_user.py similarity index 98% rename from azure-devops/azext_devops/test/team/test_user.py rename to azure-devops/azext_devops/tests/latest/team/test_user.py index 53b26d3c..16369356 100644 --- a/azure-devops/azext_devops/test/team/test_user.py +++ b/azure-devops/azext_devops/tests/latest/team/test_user.py @@ -20,7 +20,7 @@ update_user_entitlement) from azext_devops.dev.common.services import clear_connection_cache -from azext_devops.test.utils.authentication import AuthenticatedTests +from azext_devops.tests.utils.authentication import AuthenticatedTests class TestUserMethods(AuthenticatedTests): diff --git a/tests/__init__.py b/azure-devops/azext_devops/tests/utils/__init__.py similarity index 84% rename from tests/__init__.py rename to azure-devops/azext_devops/tests/utils/__init__.py index 73baee1e..34913fb3 100644 --- a/tests/__init__.py +++ b/azure-devops/azext_devops/tests/utils/__init__.py @@ -2,5 +2,3 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import pkg_resources -pkg_resources.declare_namespace(__name__) diff --git a/azure-devops/azext_devops/test/utils/authentication.py b/azure-devops/azext_devops/tests/utils/authentication.py similarity index 100% rename from azure-devops/azext_devops/test/utils/authentication.py rename to azure-devops/azext_devops/tests/utils/authentication.py diff --git a/azure-devops/azext_devops/test/utils/helper.py b/azure-devops/azext_devops/tests/utils/helper.py similarity index 100% rename from azure-devops/azext_devops/test/utils/helper.py rename to azure-devops/azext_devops/tests/utils/helper.py