Describe the bug
azext_iot/tests/central/init.py line 200:
else:
self.app_rg = self.cmd(
"iot central app show -n {}".format(
self.app_id,
)
).get_output_in_json()["resourceGroup"]
iot central app show command expect application name to be passed. Currently according to documents settings.env.azext_iot_central_app_id can be populated by user either with application id or application name. Error happens when pytest.ini has azext_iot_central_app_id populated with application id value and doesn't have value in azext_iot_testrg and in azext_iot_central_token
To Reproduce
Steps to reproduce the behavior:
Go to pytest.ini
Paste value of application id into azext_iot_central_app_id
Make sure that settings azext_iot_testrg and azext_iot_central_token are empty
Run pytest azext_iot/tests/central/test_iot_central_int.py
Tests are failing with message
No IoT Central application found with name {{application id from config}} in current subscription
Expected behavior
User should be able to use app id in test configuration otherwise setting need to be renamed to application name if going forward only name is acceptable
Environment (please complete the following information):
OS: ANY
Shell: Any
Az CLI version: 2.43.0
IoT extension version: 0.18.1
Python version (if pip installed): 3.8.10
Additional context
Add any other context about the problem here.
Describe the bug azext_iot/tests/central/init.py line 200:
iot central app show command expect application name to be passed. Currently according to documents settings.env.azext_iot_central_app_id can be populated by user either with application id or application name. Error happens when pytest.ini has azext_iot_central_app_id populated with application id value and doesn't have value in azext_iot_testrg and in azext_iot_central_token
To Reproduce Steps to reproduce the behavior:
Expected behavior User should be able to use app id in test configuration otherwise setting need to be renamed to application name if going forward only name is acceptable
Environment (please complete the following information):
Additional context Add any other context about the problem here.