Closed DeepDiver1975 closed 1 year ago
If the content is random then it's impossible to test whether the content was persisted successfully. This will break tests that check that the returned content matches what was expected.
If the content is random then it's impossible to test whether the content was persisted successfully. This will break tests that check that the returned content matches what was expected.
Yeah - I was facing this as well while testing ....
I worked around this issue by putting an initial different content - see https://github.com/DeepDiver1975/wopi-validator-core/commit/a1a4d5b44fde38b17a216f591f17eb52f71f91e9
From what I can tell the test cases are not self contained and show different behavior depending on the test which is run before.
The current code is not initializing the document with the content of the given resource as specified in the test case entity: https://github.com/DeepDiver1975/wopi-validator-core/commit/a1a4d5b44fde38b17a216f591f17eb52f71f91e9#diff-358eb290b33eeec6ae62977f738ff988R2006
We are in the process of closing this GitHub repository. This issue has been moved to the CSPP team ADO backlog list for consideration.
As of now I'm using the file's modification time and the file's content hash as version.
I think this is a quite reasonable implementation ...
But the tests are sometimes failing because the test tool puts identical content in consecutive calls. https://github.com/Microsoft/wopi-validator-core/blob/e0ede96728f92b011c6c622c6945a265d3403b04/src/WopiValidator.Core/ResourceManagement/Resource.cs#L30
I'd propose to transmit some random generated file content.
Any objections? THX