This commit is contained in:
Tamara Rahimi 2021-09-03 09:01:28 +00:00
Родитель 6892852749
Коммит dcaefbc482
2 изменённых файлов: 6 добавлений и 0 удалений

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

@ -46,6 +46,7 @@ def test_iothub_deploy(config, manifest):
assert 'DEPLOYMENT COMPLETE' in result.output
assert 'ERROR' not in result.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "edge", "deployment", "delete", "-d", deployment_name, "-l", envvars.get_envvar("IOTHUB_CONNECTION_STRING")])
@ -68,6 +69,7 @@ def test_iothub_deploy_with_target_group_set_from_dotenv():
assert 'DEPLOYMENT COMPLETE' in result.output
assert 'ERROR' not in result.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "edge", "deployment", "delete", "-d", deployment_name, "-l", envvars.get_envvar("IOTHUB_CONNECTION_STRING")])
@ -139,6 +141,7 @@ def test_iothub_deploy_and_add_tags():
assert tags in result.output
assert 'ERROR' not in result.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "edge", "deployment", "delete", "-d", deployment_name, "-l", envvars.get_envvar("IOTHUB_CONNECTION_STRING")])
@ -189,6 +192,7 @@ def test_iothub_deploy_and_add_tags_retry_after_invalid_tag():
assert 'ERROR: Failed to deploy' in result_retry.output
assert f'Message\': "ErrorCode:ConfigurationAlreadyExists;Configuration with id \'{deployment_name}\' already exist on IotHub.' in result_retry.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "edge", "deployment", "delete", "-d", deployment_name, "-l", envvars.get_envvar("IOTHUB_CONNECTION_STRING")])

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

@ -31,6 +31,7 @@ def test_add_tags():
assert '{"environment":"dev","building":"9"}' in result.output
assert 'ERROR' not in result.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "hub", "device-twin", "replace", "-d", DeviceConnectionString(envvars.get_envvar("DEVICE_CONNECTION_STRING")).device_id,
@ -80,6 +81,7 @@ def test_default_tag_from_env():
assert '{"environment":"dev","building":"9"}' in result.output
assert 'ERROR' not in result.output
# Cleanup
azure_cli = AzureCli(output, envvars)
assert azure_cli.invoke_az_cli_outproc(["iot", "hub", "device-twin", "replace", "-d", DeviceConnectionString(envvars.get_envvar("DEVICE_CONNECTION_STRING")).device_id,