зеркало из
1
0
Форкнуть 0

chore: load e2e environment from same environment variables that node scripts use (#1020)

* chore: load e2e environment from same environment variables that node scripts use

* prefer old variables
This commit is contained in:
Bert Kleewein 2022-07-07 09:42:13 -07:00 коммит произвёл GitHub
Родитель 2cbbed5e92
Коммит c56e40d82e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -38,10 +38,13 @@ def get_secrets():
IOTHUB_CONNECTION_STRING = secrets.get("iothubConnectionString", None)
EVENTHUB_CONNECTION_STRING = secrets.get("eventhubConnectionString", None)
EVENTHUB_CONSUMER_GROUP = secrets.get("eventhubConsumerGroup", None)
else:
elif "IOTHUB_E2E_IOTHUB_CONNECTION_STRING" in os.environ:
IOTHUB_CONNECTION_STRING = os.environ["IOTHUB_E2E_IOTHUB_CONNECTION_STRING"]
EVENTHUB_CONNECTION_STRING = os.environ["IOTHUB_E2E_EVENTHUB_CONNECTION_STRING"]
EVENTHUB_CONSUMER_GROUP = os.getenv("IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP", None)
else:
IOTHUB_CONNECTION_STRING = os.environ["IOTHUB_CONNECTION_STRING"]
EVENTHUB_CONNECTION_STRING = os.environ.get("EVENTHUB_CONNECTION_STRING")
parts = {}
for key_and_value in IOTHUB_CONNECTION_STRING.split(";"):

Просмотреть файл

@ -49,9 +49,8 @@ jobs:
pytest --transport=$(transport) --junitxml=junit/TEST-python-e2e.xml -o junit_suite_name="$(Agent.JobName)"
displayName: 'E2E Device Client MQTT Connection String'
env:
IOTHUB_E2E_IOTHUB_CONNECTION_STRING: $(IOTHUB-CANARY-E2E-CONNECTION-STRING)
IOTHUB_E2E_EVENTHUB_CONNECTION_STRING: $(IOTHUB-CANARY-E2E-EVENTHUB-CONNECTION-STRING)
IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP: e2e-nightly-stress-consumer-group
IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING)
EVENTHUB_CONNECTION_STRING: $(EVENTHUB-CONNECTION-STRING)
PYTHONUNBUFFERED: True
- task: PublishTestResults@2