Skip to content

Commit

Permalink
Add warning for qos deprecation and update contributing guide (#342)
Browse files Browse the repository at this point in the history
* Add warning for qos deprecation and update contributing guide
* removing version from deprecate_info
* Integration tests command update in Contributing guide
  • Loading branch information
avagraw authored May 18, 2021
1 parent 624d849 commit 4bf999a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ pip install -r path/to/source/dev_requirements
```

_Hub:_
`pytest azext_iot/tests/test_iot_ext_unit.py`
`pytest azext_iot/tests/iothub/test_iot_ext_unit.py`

_DPS:_
`pytest azext_iot/tests/test_iot_dps_unit.py`
`pytest azext_iot/tests/dps/test_iot_dps_unit.py`

### Integration Tests

Expand All @@ -127,7 +127,6 @@ You can either manually set the environment variables or use the `pytest.ini.exa
AZURE_TEST_RUN_LIVE=True
azext_iot_testrg="Resource Group that contains your IoT Hub"
azext_iot_testhub="IoT Hub Name"
azext_iot_testhub_cs="IoT Hub Connection String"
azext_iot_testdps="IoT Hub DPS Name"
azext_iot_teststorageuri="Blob Container SAS Uri"
azext_iot_identity_teststorageid="Storage Account ID"
Expand All @@ -141,13 +140,13 @@ You can either manually set the environment variables or use the `pytest.ini.exa

Execute the following command to run the IoT Hub integration tests:

`pytest azext_iot/tests/test_iot_ext_int.py`
`pytest azext_iot/tests/iothub/ -k "_int"`

##### Device Provisioning Service

Execute the following command to run the IoT Hub DPS integration tests:

`pytest azext_iot/tests/test_iot_dps_int.py`
`pytest azext_iot/tests/dps/ -k "_int"`

#### Unit and Integration Tests Single Command

Expand Down Expand Up @@ -264,7 +263,7 @@ https://medium.com/@marcobelo/setting-up-python-black-on-visual-studio-code-5318

https://docs.python.org/3/library/pdb.html

1. `pip install pdb`
1. `pip install pdbpp`
2. If you need a breakpoint, put `import pdb; pdb.set_trace()` in your code
3. Run your command, it should break execution wherever you put the breakpoint.

Expand Down
5 changes: 3 additions & 2 deletions azext_iot/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
type=str,
nargs="?",
choices=["0", "1"],
help="Quality of Service. 0 = At most once, 1 = At least once. 2 (Exactly once) is not supported.",
help="Quality of Service. 0 = At most once, 1 = At least once. 2 (Exactly once) is not supported."
"This command parameter has been deprecated and will be removed in the next release."
)

event_timeout_type = CLIArgumentType(
Expand Down Expand Up @@ -557,7 +558,7 @@ def load_arguments(self, _):
arg_type=get_enum_type(ProtocolType),
help="Indicates device-to-cloud message protocol",
)
context.argument("qos", arg_type=qos_type)
context.argument("qos", arg_type=qos_type, deprecate_info=context.deprecate())

with self.argument_context("iot device simulate") as context:
context.argument(
Expand Down

0 comments on commit 4bf999a

Please sign in to comment.