Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests on MacOS fail due issue with snapshooter #368

Open
andreas-hilti opened this issue May 20, 2024 · 0 comments
Open

Tests on MacOS fail due issue with snapshooter #368

andreas-hilti opened this issue May 20, 2024 · 0 comments

Comments

@andreas-hilti
Copy link
Contributor

Snapshooter tries to access "/_" instead of the full path.

See
SwissLife-OSS/snapshooter#196

For instance,

  Failed CycloneDX.Cli.Tests.ConvertTests.ConvertToSpdxJson(outputFormat: spdxjson) [9 ms]
  Error Message:
   System.UnauthorizedAccessException : Access to the path '/_/tests/cyclonedx.tests/__snapshots__' is denied.
---- System.IO.IOException : Permission denied
  Stack Trace:
     at System.IO.FileSystem.CreateDirectory(String fullPath)
   at System.IO.Directory.CreateDirectory(String path)
   at Snapshooter.Core.SnapshotFileHandler.CreateFolderIfNotExist(String folderPath)
   at Snapshooter.Core.SnapshotFileHandler.EnsureSnapshotFolder(SnapshotFullName snapshotFullName)
   at Snapshooter.Core.SnapshotFileHandler.ReadSnapshot(SnapshotFullName snapshotFullName)
   at Snapshooter.SnapshotAssert.AssertSnapshot(Object currentResult, SnapshotFullName snapshotFullName, Func`2 matchOptions)
   at Snapshooter.Snapshooter.AssertSnapshot(Object currentResult, SnapshotFullName snapshotFullName, Func`2 matchOptions)
   at Snapshooter.Xunit.Snapshot.Match(Object currentResult, SnapshotFullName snapshotFullName, Func`2 matchOptions)
   at Snapshooter.Xunit.Snapshot.Match(Object currentResult, SnapshotNameExtension snapshotNameExtension, Func`2 matchOptions)
   at Snapshooter.Xunit.Snapshot.Match[T](T currentResult, SnapshotNameExtension snapshotNameExtension, Func`2 matchOptions)
   at CycloneDX.Cli.Tests.ConvertTests.ConvertToSpdxJson(ConvertFormat outputFormat) in /_/tests/cyclonedx.tests/ConvertTests.cs:line 126
--- End of stack trace from previous location ---

On Windows and Linux, workarounds were merged with #367.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant