-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: add staking e2e tests #319
Conversation
✅ Heimdall Review Status
|
26f0b36
to
9da8cc5
Compare
src/tests/e2e.ts
Outdated
|
||
expect(rewards).toBeDefined(); | ||
// TODO(rohit): Fix code. This should ideally return 20. | ||
expect(rewards.length).toEqual(19); |
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.
Is this a backend change that needs to be made?
One thing to note is that this E2E test will run against many different backend versions as we aim for backwards compatibility.
So we typically run our E2E tests against the last N SDK versions (to simulate developers using older SDK versions). The N depends on the particular domain / product guaranteed stability.
So if this will change / be fixed in the context of a backend change, we might want to make this test less specific?
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.
Is this a backend change that needs to be made?
Yup. Need to dig deeper and find what exactly is the issue.
I could change it to be >=19 and <=20 for 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.
ok the API might be doing the right thing, but IMO it's confusing for end users.
Anyways, have updated the test to update the window from beginning time of start date to end time of end date. This does yield correct results.
Approved review 2462470776 from marcin-cb is now dismissed due to new commit. Re-request for approval.
b28b12b
to
ca6068a
Compare
What changed? Why?
This PR attempts to introduce some basic staking related e2e tests and to integrate with our internal testing workflows.
Plan is to follow up on this and add many more tests around testing different implementations, networks etc.
Have tried to do it in a way where every product/scope can come and add their specific env vars and tests. As a result
STAKE
.test:e2e:stake
to be able to run scope specific tests.Testing
Tested locally and made sure it's running fine in CI.
Qualified Impact