Skip to content

Commit 0754179

Browse files
committed
Refactor:
- Minor updates based on code review feedback. - Copilot suggestions has been implemented.
1 parent b0f2c51 commit 0754179

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

src/python_testing/TC_SU_2_2.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# --string-arg provider_app_path:${OTA_PROVIDER_APP}
4343
# --string-arg ota_image:${SU_OTA_REQUESTOR_V2}
4444
# factory-reset: true
45-
# quiet: true
45+
# quiet: false
4646
# === END CI TEST ARGUMENTS ===
4747

4848
import asyncio
@@ -65,11 +65,6 @@
6565

6666
class TC_SU_2_2(SoftwareUpdateBaseTest):
6767

68-
# LOG_FILE_PATH = "provider.log"
69-
# KVS_PATH = "/tmp/chip_kvs_provider"
70-
# provider_app_path = "./out/debug/chip-ota-provider-app"
71-
# ota_image_v2 = "firmware_requestor_v2min.ota"
72-
7368
async def add_single_ota_provider(self, controller, requestor_node_id: int, provider_node_id: int):
7469
"""
7570
Adds a single OTA provider to the Requestor's DefaultOTAProviders attribute
@@ -114,7 +109,6 @@ async def add_single_ota_provider(self, controller, requestor_node_id: int, prov
114109
attributes=[(0, attr)],
115110
nodeId=requestor_node_id
116111
)
117-
# ChipDeviceCtrl.writeattribute_log(resp)
118112
logger.info(f'Prerequisite #4.0 - Write DefaultOTAProviders response: {resp}')
119113
asserts.assert_equal(resp[0].Status, Status.Success, "Failed to write DefaultOTAProviders attribute")
120114

@@ -451,19 +445,6 @@ async def test_TC_SU_2_2(self):
451445
self.provider_app_path = self.user_params.get('provider_app_path', None)
452446
self.ota_image_v2 = self.user_params.get('ota_image')
453447

454-
# if self.is_pics_sdk_ci_only:
455-
# logger.info("Using SDK_CI_ONLY parameters for Provider app path and OTA image")
456-
# self.LOG_FILE_PATH = "provider.log"
457-
# self.KVS_PATH = "/tmp/chip_kvs_provider"
458-
# self.provider_app_path = self.user_params.get('provider_app_path', None) # "./out/debug/chip-ota-provider-app"
459-
# self.ota_image_v2 = self.user_params.get('ota_image')
460-
# else:
461-
# logger.info("Using default parameters for Provider app path and OTA image")
462-
# self.LOG_FILE_PATH = "provider.log"
463-
# self.KVS_PATH = "/tmp/chip_kvs_provider"
464-
# self.provider_app_path = "./out/debug/chip-ota-provider-app"
465-
# self.ota_image_v2 = "firmware_requestor_v2min.ota"
466-
467448
self.step(0)
468449
# Controller has already commissioned the requestor
469450

@@ -557,7 +538,7 @@ async def test_TC_SU_2_2(self):
557538
# ------------------------------------------------------------------------------------
558539
# [STEP_1]: Step #1.2 - Track OTA attributes: UpdateState and UpdateStateProgress
559540
# [STEP_1]: Step #1.2.1 - UpdateState matcher: Track "Downloading"
560-
# [STEP_1]: Step #1.2.2 - UpdateStateProgress matcher: Track non-null values "rage 1–99" and final "None"
541+
# [STEP_1]: Step #1.2.2 - UpdateStateProgress matcher: Track non-null values "rage 1–100" and final "None"
561542
# ------------------------------------------------------------------------------------
562543
logger.info(
563544
f'{step_number}: Step #1.1 - Started subscription for UpdateState and UpdateStateProgress attributes '
@@ -1085,8 +1066,6 @@ def matcher_idle_state_no_download(report):
10851066
nonlocal state_sequence_notavailable
10861067
val = report.Data.newState
10871068
prev_state = report.Data.previousState
1088-
# event_reason = report.Data.reason
1089-
# event_target_sw = report.Data.targetSoftwareVersion
10901069

10911070
if val is None:
10921071
return False
@@ -1207,8 +1186,6 @@ def matcher_idle_state_no_download_invalid_uri(report):
12071186
nonlocal state_sequence_notavailable
12081187
val = report.Data.newState
12091188
prev_state = report.Data.previousState
1210-
# event_reason = report.Data.reason
1211-
# event_target_sw = report.Data.targetSoftwareVersion
12121189

12131190
if val is None:
12141191
return False

0 commit comments

Comments
 (0)