Skip to content

Switch to use UnitIO in golden tests #1215

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Jun 8, 2025

Changelog

- description: |
    Switch to use `UnitIO` in golden tests.
# 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
  - refactoring    # QoL changes
  # - 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

UnitIO makes it clear that the test is a unit test and not a property test so there can be no confusion what kind of test it is.

The monad also adds type safety by not allow generators to be accidentally used as these should be reserved for property tests.

The setup for UnitIO tests is also slightly easier.

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

@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch 2 times, most recently from da551e9 to ce42acc Compare June 9, 2025 13:01
@newhoggy newhoggy marked this pull request as ready for review June 9, 2025 13:02
@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch 3 times, most recently from 2141242 to 8b88b41 Compare June 15, 2025 13:20
@newhoggy newhoggy requested review from a team as code owners June 15, 2025 13:20
@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch from 8b88b41 to fc63509 Compare June 15, 2025 13:38
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

Why watchdog is removed?

@newhoggy
Copy link
Contributor Author

newhoggy commented Jun 16, 2025

I'm interesting in seeing if it is need in CI by allowing it to run there for a few runs.

If it still happens, we can integrate the watchdog into UnitIO and not need to change the cardano-cli code.

@newhoggy newhoggy requested a review from carbolymer June 16, 2025 13:36
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

Add an an explanation as to why we are using UnitIO in the description.

@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch from fc63509 to 041af4e Compare June 25, 2025 13:33
@newhoggy newhoggy requested a review from Jimbo4350 June 25, 2025 13:40
@newhoggy
Copy link
Contributor Author

More information has been added to the Context section.

@newhoggy newhoggy requested a review from carbolymer June 25, 2025 13:42
@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch from 041af4e to 156b070 Compare June 26, 2025 12:04
@newhoggy newhoggy dismissed Jimbo4350’s stale review June 26, 2025 12:08

Comments addressed

@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch from 156b070 to 57e7e6c Compare June 27, 2025 09:51
@newhoggy newhoggy force-pushed the newhoggy/switch-to-use-UnitIO-in-golden-tests branch 2 times, most recently from 2a4e4c4 to 90eb5eb Compare June 28, 2025 07:15
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.

3 participants