-
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
E2E tests: split transactions test and use more before all instead of beforeEach #2190
Conversation
const providerId = await createMsaAndProvider(fundingSource, stakingKeys, 'stakingKeys', 10n * CENTS); | ||
const stakingAmount = 1n * DOLLARS; | ||
const providerId = await createMsaAndProvider(fundingSource, stakingKeys, 'stakingKeys', 1n * DOLLARS); | ||
const stakingAmount = 2n * DOLLARS; |
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.
These amounts needed to be higher for the variance in the weights
// Stake the amount for each test | ||
await assert.doesNotReject( | ||
stakeToProvider(fundingSource, fundingSource, capacityProvider, numberOfTests * amountStaked) | ||
); |
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.
Instead of staking enough for each call, we instead just stake in the before
based on how many tests there are
@@ -757,113 +761,4 @@ describe('Capacity Transactions', function () { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe('pay_with_capacity_batch_all', function () { |
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.
Moved to transactionsBatch.test.ts
@@ -0,0 +1,132 @@ | |||
import '@frequency-chain/api-augment'; |
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.
Moved only
@@ -13,6 +13,7 @@ export const fundingSources = [ | |||
'capacity-rpcs', | |||
'capacity-staking', | |||
'capacity-transactions', | |||
'capacity-transactions-batch', |
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.
Each test must have a unique funding key
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 was expecting these changes 💯
Goal
The goal of this PR is to clean up some some small things about the e2e tests
Part of #2154
Discussion
beforeEach
actions to thebefore
allTesting
make e2e-tests