From 14189c50aa6d45f9312d8949d2573180ff0964cc Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 11 May 2021 12:03:28 +0300 Subject: [PATCH] wallet: add test to regenerate Oracle testwallets --- pkg/wallet/regenerate_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg/wallet/regenerate_test.go b/pkg/wallet/regenerate_test.go index 56499e5a9..19cae1c91 100644 --- a/pkg/wallet/regenerate_test.go +++ b/pkg/wallet/regenerate_test.go @@ -155,3 +155,28 @@ func TestRegenerateNotaryWallets(t *testing.T) { require.NoError(t, w.savePretty()) w.Close() } + +func TestRegenerateOracleWallets(t *testing.T) { + if !regenerate { + return + } + const ( + walletDir = "../services/oracle/testdata/" + acc1WIF = "L38E2tRktb2kWc5j3Kx6Cg3ifVoi4DHhpVZrQormEFTT92C4iSUa" + acc2WIF = "KyA8z2MyLCSjJFG3F4SUp85CZ4WJm4qgWihFJZFEDYGEyw8oGcEP" + ) + + acc1 := getAccount(t, acc1WIF, "one") + w, err := NewWallet(path.Join(walletDir, "oracle1.json")) + require.NoError(t, err) + w.AddAccount(acc1) + require.NoError(t, w.savePretty()) + w.Close() + + acc2 := getAccount(t, acc2WIF, "two") + w, err = NewWallet(path.Join(walletDir, "oracle2.json")) + require.NoError(t, err) + w.AddAccount(acc2) + require.NoError(t, w.savePretty()) + w.Close() +}