-
-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
Describe the bug
After upgrading Verify.NUnit from version 31.7.1 to 31.7.2 (or higher), tests started failing with the following error:
System.Exception : Failed to compare files
----> System.TypeInitializationException : The type initializer for 'EmptyFiles.AllFiles' threw an exception.
----> System.Exception : Could not find empty files directory. Searched: ...
My CI/CD workflow builds the test project once and then runs the compiled binaries on a schedule, so building and running tests are separate jobs. The test project is built using the dotnet publish command.
After inspecting the published output, I noticed that the EmptyFiles directory is missing. Downgrading to 31.7.1 resolves the issue.
Minimal Repro
Run the following:
git clone https://github.com/VerifyTests/Verify.git
cd ./Verify/usages/NUnitNugetUsage/
dotnet publish ./NUnitNugetUsage.csproj -o ./out/
ls -dir ./out/EmptyFiles/Notice that the EmptyFiles directory is missing when using 31.7.2 or newer.
Metadata
Metadata
Assignees
Labels
No labels