stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.78k stars 187 forks source link

Issue when attempting to use Azure File Share as Baseline storage provider #2026

Closed jkingdon-ms closed 2 years ago

jkingdon-ms commented 2 years ago

Describe the bug Trying to use Azure File Share as the Storage Provider for the Baseline feature. When I attempt to do this however, I get the following results:

Logs

dotnet stryker --with-baseline:main --version "feature/mutation-baseline" --azure-fileshare-sas "PLACEHOLDER"
...
Your html report has been generated at:
/Users/jameskingdon/Projects/Mutation-Testing/Example/ExampleTest/StrykerOutput/2022-05-02.14-39-35/reports/mutation-report.html
You can open it in your browser of choice.
[14:42:08 ERR] Azure File Storage upload failed with statuscode BadRequest and message: <?xml version="1.0" encoding="utf-8"?><Error><Code>UnsupportedHeader</Code><Message>One of the HTTP headers specified in the request is not supported.
RequestId:5b7011cf-301a-0025-0654-5e4df8000000
Time:2022-05-02T18:42:08.2297005Z</Message><HeaderName>x-ms-file-last-write-time</HeaderName></Error>
[14:42:08 INF] Time Elapsed 00:02:32.9276136

Expected behavior I expected the results to be uploaded to Azure File Share.

Desktop (please complete the following information):

Additional context ~I tried running Stryker locally, removing that header and I get an error response saying that it does in fact need that header:~

Your html report has been generated at:
C:\Users\jkingdon\source\repos\Mutation-Testing\Example\ExampleTest\StrykerOutput\2022-05-02.20-27-39\reports\mutation-repor
t.html
You can open it in your browser of choice.
[20:31:16 ERR] Creating directory failed with status BadRequest and message <?xml version="1.0" encoding="utf-8"?><Error><Code>MissingRequiredHeader</Code><Message>An HTTP header that's mandatory for this request is not specified.
RequestId:5a3b80d3-a01a-0008-0d63-5efe8b000000
Time:2022-05-02T20:31:14.8699520Z</Message><HeaderName>x-ms-file-last-write-time</HeaderName></Error>
[20:31:16 INF] Time Elapsed 00:03:36.6097130

~which I've also confirmed it does via the official documentation.~

Figured out reason for above is because the failure was happening at the file create rather than directory create.

jkingdon-ms commented 2 years ago

I've fixed the issue locally, will open a PR.

rouke-broersma commented 2 years ago

Weird that this suddenly changed. Thank you for providing a fix!