Testing SharedReaderKeys requires using withKnownIssue which doesn't feel right #143
Replies: 3 comments 1 reply
-
FWIW my use case for this fix had nothing to do with Sharing so I’m not sure this library is the right place to fix this. |
Beta Was this translation helpful? Give feedback.
-
We agree. We're thinking on various changes at the Issue Reporting level, but also don't think Sharing should report these issues outside of debug builds, and certainly not during tests. When this PR lands the next release should fix things: #144 |
Beta Was this translation helpful? Give feedback.
-
It is released as far as I can see and I have tested it in my own project. Thanks for your work 😄 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently to test
SharedReaderKey
failures we are required to usewithKnownIssue
asSharing
reports these issues internally with no way to control the behaviour.For example:
swift-sharing/Tests/SharingTests/FileStorageTests.swift
Lines 139 to 147 in 813b8b5
From the WWDC session Go further with Swift Testing we can gain some insight into the purpose of
withKnownIssue
We can see from the presentation here, as well as the behaviour in Xcode (grey diamond instead of green diamond) that this feature is to mark tests as poorly behaving to remediate later.
However we actually want our tests of
SharedReaderKey
implementations correctly handling errors to go green. So we need some way to control this behaviour.@lukeredpath has started some work in Issue Reporting to address this here however I wonder if the correct place to fix this isn't in Sharing itself.
As I'm fairly new to the Sharing codebase I'm looking to get some agreement or direction, if others agree I'm happy to work on an implementation to implement the suggestion.
Beta Was this translation helpful? Give feedback.
All reactions