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:
Родитель
2cbbed5e92
Коммит
c56e40d82e
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче