Skip to content

Commit

Permalink
Depend less on precise all-clusters-app endpoints layout in Darwin te…
Browse files Browse the repository at this point in the history
…sts. (project-chip#34378)

* Depend less on precise all-clusters-app endpoints layout in Darwin tests.

* test020_ReadMultipleAttributes and
  test021_ReadMultipleWildcardPathsIncludeUnsupportedAttribute were assuming
  three endpoints numbered 0, 1, 2. The fix is to just read the PartsList from
  the device instead of making assumptions.
* test033_TestMTRDeviceDeviceConfigurationChanged was assuming various things
  about which clusters are on which endpoints, as well as assuming that the
  PartsList of EP0 is _not_ [1, 2, 3].  Fix things so that we track which
  endpoint things are actually on, and make sure we take the PartsList from the
  device and add an entry that's not in it already to it instead of assuming its
  value.
* testDataStorageUpdatesWhenRemovingEndpoints was comparing arrays of endpoints,
  but some of those arrays come from enumerating dictionary keys.  Changing the
  set of keys can change their order.  The fix is to compare sets of endpoints
  instead.  Also, add asserts that the endpoint we are removing (2) is actually
  in the list, so that if that ever stops being true the test failure will be
  more understandable.

* Apply suggestions from code review

Co-authored-by: Kiel Oleson <[email protected]>

---------

Co-authored-by: Kiel Oleson <[email protected]>
  • Loading branch information
2 people authored and j-ororke committed Jul 31, 2024
1 parent ac11993 commit a5dc4f9
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 61 deletions.
Loading

0 comments on commit a5dc4f9

Please sign in to comment.