-
Notifications
You must be signed in to change notification settings - Fork 631
[CO-410] Split test-suites for NetworkMainOrStage/NetworkTestnet #3756
Conversation
59acf89
to
9c2a9f9
Compare
fc4b43e
to
b7cc800
Compare
b7cc800
to
7a213ab
Compare
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.
Overall looks good, just a few minor fixes/suggestions.
specBody pm | ||
|
||
specBody :: ProtocolMagic -> Spec | ||
specBody _pm = describe "Ssc.VssCertData" $ do -- withProvidedMagicConfig pm $ \_ _ _ -> describe "Ssc.VssCertData" $ do |
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.
Some commented out code here.
prop "creates a Set of Addresses by given txs" | ||
addressSetByTxsProp | ||
prop "creates a Set of Addresses by given txs" $ | ||
\nm -> addressSetByTxsProp nm |
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.
I think this lambda can be removed.
specBody pm | ||
|
||
specBody :: ProtocolMagic -> Spec | ||
specBody pm = withProvidedMagicConfig pm $ \_ _ _ -> describe "computeSharesDistr" $ do |
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.
I think withProvidedMagicConfig
can be removed here as it doesn't look like any configuration or protocol magic values are being used in this Spec
.
fakeAddressHasMaxSizeTest changeAddressGenerator | ||
prop "genUniqueAddress" $ | ||
fakeAddressHasMaxSizeTest commonAddressGenerator | ||
-- TODO @intricate: Not sure how to make the constraints play nice here |
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.
Comment left here.
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.
Forgot to remove this, thanks.
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.
Some general comments. I'll discuss with Luke whether these are showstoppers or can be deferred to a later "cleanup PR".
genBHLWithMagic | ||
:: ProtocolMagic | ||
-> Gen BlockHeaderList | ||
genBHLWithMagic pm = do |
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 name could be improved - perhaps something like genStubbedBHLW
? Since it stubs out some of the parameters of genBHLW
?
This is not a big priority, and could be addressed later.
a84a217
to
466215e
Compare
All concerns mentioned here have been addressed.
Co-authored-by: Jordan Millar <[email protected]> Co-authored-by: Michael Hueschen <[email protected]>
Co-authored-by: Jordan Millar <[email protected]> Co-authored-by: Michael Hueschen <[email protected]>
da4d4f2
to
94bbdaf
Compare
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.
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.
LGTM!
Description
"Split" the test-suites, for both
RequiresNoMagic
andRequiresMagic
cases. Also, introduce arbitraryProtocolMagic
s (replacedummyProtocolMagic
values). Since we hardcoded values in #3733, both splits should pass.Motivation: in order to follow best practices of modifying tests & source code in separate PRs, today I factored out the testsuite modifications into a separate PR. We are PR'ing this before the full implementation of
NetworkMagic
is PR'ed, because we want to demonstrate that the tests can be split & parameterized by arbitraryProtocolMagic
s, without modifying source code, and still pass. Then, when we modify the source and pass the tests, we will have more confidence in a correct implementation.Linked issue
https://iohk.myjetbrains.com/youtrack/issue/CO-410
Type of change
Developer checklist
^ there is no 1.3.1 section in the CHANGELOG, and this is dev work on a release branch, so I'm skipping this.
Testing checklist