Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timesync tests: minor fixes #27459

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/python_testing/TC_TIMESYNC_2_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def test_TC_TIMESYNC_2_5(self):
self.print_step(4, "Test setting unsorted list - expect error")
if dst_max_size_dut > 1:
th_utc = utc_time_in_matter_epoch()
dst = [dst_struct(offset=3600, validStarting=th_utc, valid_until=th_utc+1.577e+13),
dst = [dst_struct(offset=3600, validStarting=th_utc, validUntil=th_utc+1.577e+13),
dst_struct(offset=3600, validStarting=0, validUntil=th_utc)]
await self.send_set_dst_cmd_expect_error(dst=dst, error=Status.ConstraintError)

Expand All @@ -79,7 +79,7 @@ async def test_TC_TIMESYNC_2_5(self):
self.print_step(6, "Test setting list with invalid second entry - expect error")
if dst_max_size_dut > 1:
th_utc = utc_time_in_matter_epoch()
dst = [dst_struct(offset=3600, validStarting=0, valid_until=th_utc+3e+8),
dst = [dst_struct(offset=3600, validStarting=0, validUntil=th_utc+3e+8),
dst_struct(offset=3600, validStarting=th_utc, validUntil=th_utc+1.577e+13)]
await self.send_set_dst_cmd_expect_error(dst=dst, error=Status.ConstraintError)

Expand All @@ -91,7 +91,7 @@ async def test_TC_TIMESYNC_2_5(self):
self.print_step(8, "Test setting list with two null values - expect error")
if dst_max_size_dut > 1:
th_utc = utc_time_in_matter_epoch()
dst = [dst_struct(offset=3600, validStarting=0, valid_until=NullValue),
dst = [dst_struct(offset=3600, validStarting=0, validUntil=NullValue),
dst_struct(offset=3600, validStarting=th_utc+3e+8, validUntil=NullValue)]
await self.send_set_dst_cmd_expect_error(dst=dst, error=Status.ConstraintError)

Expand All @@ -103,7 +103,7 @@ async def test_TC_TIMESYNC_2_5(self):
self.print_step(10, "Test setting list with null value not at end - expect error")
if dst_max_size_dut > 1:
th_utc = utc_time_in_matter_epoch()
dst = [dst_struct(offset=3600, validStarting=0, valid_until=NullValue),
dst = [dst_struct(offset=3600, validStarting=0, validUntil=NullValue),
dst_struct(offset=3600, validStarting=th_utc+3e+8, validUntil=th_utc+1.577e+13)]
await self.send_set_dst_cmd_expect_error(dst=dst, error=Status.ConstraintError)

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_TC_TIMESYNC_2_6(self):

self.print_step(14, "Set DefaultNTP to good IPv6")
ntp = "fe80::1"
await self.send_set_default_ntp(ntp=ntp)
await self.send_set_default_ntp_cmd(ntp=ntp)

self.print_step(15, "Read DefaultNTP")
attr = await self.read_ts_attribute_expect_success(default_ntp_attr)
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def test_TC_TIMESYNC_2_7(self):
local = await self.read_ts_attribute_expect_success(local_attr)
compare_time(received=local, offset=timedelta(), tolerance=timedelta(seconds=5))

self.print_step(6, "Send SetTimeZone command with 0 offset")
self.print_step(6, "Send SetTimeZone command with 3600 offset")
tz = [tz_struct(offset=3600, validAt=0)]
ret = await self.send_set_time_zone_cmd(tz)
asserts.assert_true(ret.DSTOffsetRequired, "DSTOffsetRequired not set to true")
Expand Down