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

Replace usages of assertFileOccurences by comparisons with golden files (1/n) #426

Merged
merged 4 commits into from
Nov 3, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Nov 2, 2023

Changelog

- description: |
    Replace usages of assertFileOccurences by comparisons with golden files
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/fix-assert-file-occurences branch from d20ab39 to 9d81ccb Compare November 2, 2023 19:51
@smelc smelc changed the title Replace usages of assertFileOccurences by comparisons with golden files Replace usages of assertFileOccurences by comparisons with golden files (1/n) Nov 2, 2023
@smelc smelc marked this pull request as ready for review November 2, 2023 19:51
Comment on lines -48 to -51
H.assertFileOccurences 1 "Governance proposal" actionFile

H.assertEndsWithSingleNewline actionFile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be removed, because we actually do a nearly-full (only the cbor Hex gets ignored) comparison against a golden file.

@smelc
Copy link
Contributor Author

smelc commented Nov 2, 2023

I could have put more in this PR, but since I'm off tomorrow (Friday), let's try to merge it sooner than later.

@newhoggy newhoggy added this pull request to the merge queue Nov 3, 2023
Merged via the queue into main with commit 92115ee Nov 3, 2023
22 checks passed
@newhoggy newhoggy deleted the smelc/fix-assert-file-occurences branch November 3, 2023 11:55
import qualified Hedgehog.Extras.Test.Golden as H

hprop_golden_governanceActionCreateConstitution :: Property
hprop_golden_governanceActionCreateConstitution =
hprop_golden_governance_action_create_constitution :: Property
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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

Successfully merging this pull request may close these issues.

None yet

4 participants