test_pipeline_create_and_variables_test Fix (#1184)
* test_devops_group_and_member_tests * sleep_in_live_run to 60 * Update test_devopsSecurityGroupTest.py * 1175 changes * Cassete updated * Pipeline fix * Authering test steps updated Co-authored-by: Roshan-sy <roshan-sy@github.com>
This commit is contained in:
Родитель
9e3e15dbc1
Коммит
8cb419bdb3
|
@ -32,6 +32,11 @@
|
|||
Make sure your machine python SDK cache is clear. It is located at `%userprofile%\.azure-devops\python-sdk\cache\`
|
||||
While running the test localy for first time make sure that the cassest (in the recording folder) gets the resource call as well
|
||||
|
||||
## Logout from az cli
|
||||
|
||||
Do `az logout` so that PAT token can be used.
|
||||
If you don't logout, system will not take PAT for Authentication, which will result into test fail in PR pipeline.
|
||||
|
||||
## Configure PAT for running live tests
|
||||
|
||||
Recommended way is to use PAT from environment variable (AZURE_DEVOPS_EXT_PAT) when running a live test, so your PAT in the test file does not accidently get exposed to public in a PR.
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -9,7 +9,7 @@ import unittest
|
|||
from azure_devtools.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'
|
||||
DEVOPS_CLI_TEST_ORGANIZATION = get_test_org_from_env_variable() or 'Https://dev.azure.com/devops-cli-test-org'
|
||||
|
||||
class PipelinesTests(DevopsScenarioTest):
|
||||
@AllowLargeResponse(size_kb=3072)
|
||||
|
@ -34,7 +34,7 @@ class PipelinesTests(DevopsScenarioTest):
|
|||
created_repo_name = list_repo_output[0]["name"]
|
||||
|
||||
# Import repo with yaml file
|
||||
import_repo_command = 'az repos import create --git-source-url https://dev.azure.com/AzureDevOpsCliTest/ImportRepoTest/_git/snakes-and-ladders --repository ' + created_repo_id + ' --detect false --output json'
|
||||
import_repo_command = 'az repos import create --git-source-url https://dev.azure.com/devops-cli-test-org/TestSupportProject/_git/snakes-and-ladders --repository ' + created_repo_id + ' --detect false --output json'
|
||||
import_repo_output = self.cmd(import_repo_command).get_output_in_json()
|
||||
import_repo_status = import_repo_output["status"]
|
||||
assert import_repo_status == 'completed'
|
||||
|
@ -43,7 +43,7 @@ class PipelinesTests(DevopsScenarioTest):
|
|||
PIPELINE_NAME = 'ContosoBuild'
|
||||
PIPELINE_DESCRIPTION = 'Pipeline for contoso project'
|
||||
pipeline_create_command = 'az pipelines create --name {} --description "{}" --repository {} \
|
||||
--repository-type tfsgit --branch master --yml-path azure-pipelines.yml --detect false \
|
||||
--repository-type tfsgit --branch main --yml-path azure-pipelines.yml --detect false \
|
||||
--output json'.format(PIPELINE_NAME, PIPELINE_DESCRIPTION, created_repo_name)
|
||||
pipeline_create_output = self.cmd(pipeline_create_command).get_output_in_json()
|
||||
created_pipeline_id = pipeline_create_output['definition']['id']
|
||||
|
|
Загрузка…
Ссылка в новой задаче