-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(test-suite): implement test for paused gateway contracts #1353
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
base: main
Are you sure you want to change the base?
Conversation
| run: | | ||
| ./fhevm-cli unpause gateway | ||
| # E2E tests after unpausing the Gateway contracts |
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 don't think this is great as it will make e2e tests much longer, maybe we could instead start with the pausing tests and then run the usual tests after unpausing the contracts ?
| ); | ||
| inputAlice.add64(18446744073709550042n); | ||
|
|
||
| await expect(inputAlice.encrypt()).to.be.rejectedWith(new RegExp('Input request failed')); |
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 is not way to make sure the revert is coming from EnforcedPause revert from the gateway ?
| privateKey, | ||
| publicKey, | ||
| ), | ||
| ).to.be.rejectedWith(new RegExp('User decrypt failed')); |
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.
same
| const handleAddress = await this.httpPublicDecryptContract.xAddress(); | ||
| const handle32 = await this.httpPublicDecryptContract.xUint32(); | ||
| await expect(this.instances.alice.publicDecrypt([handleAddress, handle32, handleBool])).to.be.rejectedWith( | ||
| new RegExp('Public decrypt failed'), |
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.
same
|
a bit harder to write the tests, but would it also make sense to have a test that :
|
E2E tests passed here.
Refs https://github.com/zama-ai/fhevm-internal/issues/218