-
Notifications
You must be signed in to change notification settings - Fork 19
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
ethereum: added e2e tests #2218
Conversation
@@ -1,3 +1,4 @@ | |||
/* eslint-disable no-restricted-syntax */ |
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.
Only ignoring the custom rule in here
@@ -51,6 +51,19 @@ export default tseslint.config( | |||
}, | |||
], | |||
'allow-namespace': 'off', | |||
'no-restricted-syntax': [ |
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.
adding new rules so going forward we have to use correct functions
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.
read through, lgtm 💯
const schema = { | ||
type: 'record', | ||
name: 'Post', | ||
fields: [ | ||
{ name: 'title', type: { name: 'Title', type: 'string' } }, | ||
{ name: 'content', type: { name: 'Content', type: 'string' } }, | ||
{ name: 'fromId', type: { name: 'DSNPId', type: 'fixed', size: 8 } }, | ||
{ name: 'objectId', type: 'DSNPId' }, | ||
], | ||
}; | ||
|
||
schemaId = await ExtrinsicHelper.getOrCreateSchemaV3( | ||
keys, | ||
schema, | ||
'AvroBinary', | ||
'OnChain', | ||
[], | ||
'test.grantDelegation' | ||
); | ||
|
||
schemaId2 = await ExtrinsicHelper.getOrCreateSchemaV3( | ||
keys, | ||
schema, | ||
'AvroBinary', | ||
'OnChain', | ||
[], | ||
'test.grantDelegationSecond' | ||
); | ||
}); |
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.
nit: probably don't need to create schemas any more, unless actually testing the schemas pallet, as mainnet schemas should be available on all chains now
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.
yeah this is getting the schemaId if it already exists but I agree that we can refactor all these schema creation everywhere and simplify it but looks like a wider effort outside of the scope of this ticket. Will create an issue for 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.
One general comment: it seems you've cloned some of the tests solely to validate that they work as well with Ethereum-style keys. Might it be simpler to just convert the existing tests to table tests that run the same test using different keys?
@JoeCap08055 There are some minor other differences between ethereum ones and other ones besides the keys used. One of the benefits of having them in separate files is that I can just change the test selector to |
If there's a good reason, then I'm fine with 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.
Couple of non-blocking comments from me, if you can add those extra checks that @JoeCap08055 suggested I think that would be a good idea.
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.
- Read through changes
🚢 it!
Goal
The goal of this PR is
Closes #2203
Discussion
Checklist