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

cardano-testnet-test: allow to rewrite Conway configuration #5643

Closed
wants to merge 1 commit into from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Jan 17, 2024

Description

This PR makes it possible to rewrite the Conway genesis file before calling create-testnet-data in integration tests. I have been using it to tweak parameters in not-yet-PRed work, but this will be useful to others.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • NA New tests are added if needed and existing tests are updated.
  • NA Any changes are noted in the CHANGELOG.md for affected package
  • NA The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
  • Self-reviewed the diff

@smelc smelc marked this pull request as ready for review January 17, 2024 12:55

mkConf :: FilePath -> Integration Conf
mkConf tempAbsPath' =
return $ Conf
{ tempAbsPath = TmpAbsolutePath tempAbsPath'
, rewriteConway = id -- By default, don't change anything
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you link to the PR where you use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

{ tempAbsPath :: TmpAbsolutePath
} deriving (Eq, Show)
, -- | Function to rewrite the Conway genesis file before creating the testnet
rewriteConway :: Ledger.ConwayGenesis StandardCrypto -> Ledger.ConwayGenesis StandardCrypto
Copy link
Contributor

@Jimbo4350 Jimbo4350 Jan 19, 2024

Choose a reason for hiding this comment

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

This is precisely what we don't want to do. We do not want to re-write things in the test. The configuration you begin with is the configuration that is used. All fiddling with genesis files should happen before the test begins and not in Haskell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jimbo4350> I don't understand your reluctance here. The rewrite is actually specified at the beginning in the test when using this API, see e.g.

for an example.

Why do you think this is harmful?

@smelc
Copy link
Contributor Author

smelc commented Jan 23, 2024

Putting draft again, as this is probably superseded by #5645

@smelc smelc marked this pull request as draft January 23, 2024 11:07
@smelc
Copy link
Contributor Author

smelc commented Feb 2, 2024

Closing, as #5645 got merged

@smelc smelc closed this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants