-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add jsons #357
Add jsons #357
Conversation
@@ -66,6 +67,8 @@ func (test *CreateMsgSpecTest) Run(t *testing.T) { | |||
require.Fail(t, "post state not equal", diff) | |||
} | |||
require.EqualValues(t, test.ExpectedRoot, hex.EncodeToString(r[:])) | |||
|
|||
typescomparable.CompareWithJson(t, test, test.TestName(), reflect.TypeOf(test).String()) |
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.
what is the point of this if the root is being compared just above? just so we can see the diffs in the console?
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 the above root test is just a check on the expected root of the created message.
But, the CompareWithJson
should show us any difference in the test "content".
@GalRogozinski correct me if I'm wrong
for _, testF := range spectest.AllTests { | ||
// generate post state comparison | ||
writeJsonStateComparison(testF.TestName(), reflect.TypeOf(testF).String(), testF) | ||
} |
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 the crux of it, right?
if ConsensusData/SSVMessage/SignedMessage roots changed, then we'll see it in the GitHub diff?
* create jsons * compare with jsons * generate jsons for qbft signed message * compare qbft signed message with json state * fix lint error * generate jsons for create msg test * generate jsons for create msg test * use correct test type * use correct test name
…compatibility (#362) * Revert "Deneb Support (#324)" This reverts commit f2d5899. * Add jsons (#357) * create jsons * compare with jsons * generate jsons for qbft signed message * compare qbft signed message with json state * fix lint error * generate jsons for create msg test * generate jsons for create msg test * use correct test type * use correct test name * Return deneb with old encoding (#360) * Revert "Revert "Deneb Support (#324)"" This reverts commit 0a559e2. * use custom old encodings * generate-jsons * Add phase0 version * Bellatrix -> Capella on a single test * Generate jsons * Revert Capella -> Deneb on a single test --------- Co-authored-by: MatheusFranco99 <48058141+MatheusFranco99@users.noreply.github.com> --------- Co-authored-by: MatheusFranco99 <48058141+MatheusFranco99@users.noreply.github.com>
Description
Add state comparison jsons for types and signedMessage.
Now any change in the tests is easily detectable.