Skip to content
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

Feature: add blockchain network revart after Authorizer rewards tests #935

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/cli_tests/zwalletcli_authorizer_rewards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ func TestAuthorizerRewards(testSetup *testing.T) {
t.Parallel()

t.RunWithTimeout("Verify Authorizer Rewards", time.Minute*10, func(t *test.SystemTest) {
snapshotHash, err := tenderlyClient.CreateSnapshot()
require.NoError(t, err)

err = tenderlyClient.InitBalance(ethereumAddress)
require.NoError(t, err)

err = tenderlyClient.InitErc20Balance(tokenAddress, ethereumAddress)
require.NoError(t, err)

output, err := createWallet(t, configPath)
require.Nil(t, err, "Failed to create wallet", strings.Join(output, "\n"))

Expand All @@ -46,6 +55,9 @@ func TestAuthorizerRewards(testSetup *testing.T) {
require.Nil(t, err)

require.Equal(t, feeRewardAuthorizerAfterMint.TotalReward, feeRewardAuthorizer.TotalReward+33, "Fee reward authorizer should be increased by 33.33 ZCN")

err = tenderlyClient.Revert(snapshotHash)
require.NoError(t, err)
})
}

Expand Down