Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testsuite/storjscan: add client claim wallet test
Adds integration test for storjscan client claim eth wallet method. Change-Id: I69d1e4f9417c1225e97d5e5c6f0f394eaf68fbef
- Loading branch information
Showing
2 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (C) 2022 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
package storjscan_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"storj.io/common/testcontext" | ||
"storj.io/storj/private/testplanet" | ||
"storj.io/storj/testsuite/storjscan/storjscantest" | ||
"storj.io/storjscan/blockchain" | ||
) | ||
|
||
func TestClientWalletsClaim(t *testing.T) { | ||
storjscantest.Run(t, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, stack *storjscantest.Stack) { | ||
expected, _ := blockchain.AddressFromHex("0x27e3d303B0B70B1b17f14525b48Ae7c45D34666f") | ||
err := stack.App.Wallets.Service.Register(ctx, "eu", map[blockchain.Address]string{ | ||
expected: "test", | ||
}) | ||
require.NoError(t, err) | ||
|
||
addr, err := planet.Satellites[0].API.Payments.StorjscanClient.ClaimNewEthAddress(ctx) | ||
require.NoError(t, err) | ||
require.Equal(t, expected, blockchain.Address(addr)) | ||
}) | ||
} |
a6ad86d
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.
This commit has been mentioned on Storj Community Forum (official). There might be relevant details there:
https://forum.storj.io/t/release-preparation-v1-62/19444/1