Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Depend less on precise all-clusters-app endpoints layout in Darwin te…
…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