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

fix(snapshot): fixed snapshots always created in testza directory #65

Merged
merged 4 commits into from
Nov 9, 2021
Merged

fix(snapshot): fixed snapshots always created in testza directory #65

merged 4 commits into from
Nov 9, 2021

Conversation

TobiaszCudnik
Copy link
Contributor

Snapshots work only within testza itself and when used in another module, try to create a fixture file within the testza dir (which results in no permission).

This PR fixes a nesting issue in the snapshot support by extracting internal logic to a shared function (thus normalizing the stack trace).

Affected:

  • SnapshotCreateOrValidate
  • SnapshotCreate

PS. A regression test calling from another module would be nice, but not sure how to hook it up to the main go test.

@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #65 (8944be1) into main (e46e881) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   88.56%   88.64%   +0.07%     
==========================================
  Files          10       10              
  Lines         621      625       +4     
==========================================
+ Hits          550      554       +4     
  Misses         37       37              
  Partials       34       34              
Impacted Files Coverage Δ
snapshot.go 84.84% <100.00%> (+0.97%) ⬆️
utils.go 77.77% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e46e881...8944be1. Read the comment docs.

Copy link
Owner

@MarvinJWendt MarvinJWendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix! 🚀

@MarvinJWendt MarvinJWendt changed the title Snapshots always created in testza directory fix(snapshot): fixed snapshots always created in testza directory Nov 9, 2021
@MarvinJWendt MarvinJWendt merged commit f727b75 into MarvinJWendt:main Nov 9, 2021
@github-actions github-actions bot added the fix label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants