-
Notifications
You must be signed in to change notification settings - Fork 724
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
Conversation
|
||
mkConf :: FilePath -> Integration Conf | ||
mkConf tempAbsPath' = | ||
return $ Conf | ||
{ tempAbsPath = TmpAbsolutePath tempAbsPath' | ||
, rewriteConway = id -- By default, don't change anything |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Line 87 in 51b8258
conf = conf' { rewriteConway } |
Why do you think this is harmful?
Putting draft again, as this is probably superseded by #5645 |
Closing, as #5645 got merged |
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
CHANGELOG.md
for affected package.cabal
files are updated