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

TC-TIMESYNC-2.2: Add missing step #29416

Merged
Merged
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/python_testing/TC_TIMESYNC_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ async def test_TC_TIMESYNC_2_2(self):
"Granularity out of expected range")
asserts.assert_not_equal(granularity_dut, time_cluster.Enums.GranularityEnum.kNoTimeGranularity)

self.print_step(4, "Read UTC time")
th_utc = utc_time_in_matter_epoch()
utc_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.UTCTime)
asserts.assert_is_not(utc_dut, NullValue, "Received null value for UTCTime after set")
Expand All @@ -72,6 +73,12 @@ async def test_TC_TIMESYNC_2_2(self):
tolerance = timedelta(minutes=1)
compare_time(received=utc_dut, utc=th_utc, tolerance=tolerance)

self.print_step(5, "Read time source")
if (self.check_pics("TIMESYNC.S.A0002")):
cecille marked this conversation as resolved.
Show resolved Hide resolved
cecille marked this conversation as resolved.
Show resolved Hide resolved
if utc_dut_initial is NullValue:
source = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.TimeSource)
cecille marked this conversation as resolved.
Show resolved Hide resolved
asserts.assert_equal(source, Clusters.Objects.TimeSynchronization.Enums.TimeSourceEnum.kAdmin)


if __name__ == "__main__":
default_matter_test_main()