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. (#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 <kielo@apple.com>

---------

Co-authored-by: Kiel Oleson <kielo@apple.com>
  • Loading branch information
2 people authored and pull[bot] committed Sep 13, 2024
1 parent 15fcc33 commit 36849a8
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 61 deletions.
Loading

0 comments on commit 36849a8

Please sign in to comment.