From e5a63946799fb3b726c3abdcc909edf1c5ba5900 Mon Sep 17 00:00:00 2001 From: rhuairahrighairigh Date: Tue, 25 Jun 2019 14:30:06 +0100 Subject: [PATCH] fix tests --- cli_test/cli_test.go | 10 +++++----- cli_test/test_helpers.go | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index bbe42846..0b9ab572 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -56,7 +56,7 @@ func TestGaiaCLIKeysAddRecover(t *testing.T) { exitSuccess, _, _ = f.KeysAddRecover("test-recover", "dentist task convince chimney quality leave banana trade firm crawl eternal easily") require.True(t, exitSuccess) - require.Equal(t, "cosmos1qcfdf69js922qrdr4yaww3ax7gjml6pdds46f4", f.KeyAddress("test-recover").String()) + require.Equal(t, "k1qcfdf69js922qrdr4yaww3ax7gjml6pd3fmkx7", f.KeyAddress("test-recover").String()) } func TestGaiaCLIKeysAddRecoverHDPath(t *testing.T) { @@ -64,16 +64,16 @@ func TestGaiaCLIKeysAddRecoverHDPath(t *testing.T) { f := InitFixtures(t) f.KeysAddRecoverHDPath("test-recoverHD1", "dentist task convince chimney quality leave banana trade firm crawl eternal easily", 0, 0) - require.Equal(t, "cosmos1qcfdf69js922qrdr4yaww3ax7gjml6pdds46f4", f.KeyAddress("test-recoverHD1").String()) + require.Equal(t, "k1qcfdf69js922qrdr4yaww3ax7gjml6pd3fmkx7", f.KeyAddress("test-recoverHD1").String()) f.KeysAddRecoverHDPath("test-recoverH2", "dentist task convince chimney quality leave banana trade firm crawl eternal easily", 1, 5) - require.Equal(t, "cosmos1pdfav2cjhry9k79nu6r8kgknnjtq6a7rykmafy", f.KeyAddress("test-recoverH2").String()) + require.Equal(t, "k1pdfav2cjhry9k79nu6r8kgknnjtq6a7rc043x0", f.KeyAddress("test-recoverH2").String()) f.KeysAddRecoverHDPath("test-recoverH3", "dentist task convince chimney quality leave banana trade firm crawl eternal easily", 1, 17) - require.Equal(t, "cosmos1909k354n6wl8ujzu6kmh49w4d02ax7qvlkv4sn", f.KeyAddress("test-recoverH3").String()) + require.Equal(t, "k1909k354n6wl8ujzu6kmh49w4d02ax7qvr0zelc", f.KeyAddress("test-recoverH3").String()) f.KeysAddRecoverHDPath("test-recoverH4", "dentist task convince chimney quality leave banana trade firm crawl eternal easily", 2, 17) - require.Equal(t, "cosmos1v9plmhvyhgxk3th9ydacm7j4z357s3nhtwsjat", f.KeyAddress("test-recoverH4").String()) + require.Equal(t, "k1v9plmhvyhgxk3th9ydacm7j4z357s3nhhh77jq", f.KeyAddress("test-recoverH4").String()) } func TestGaiaCLIMinimumFees(t *testing.T) { diff --git a/cli_test/test_helpers.go b/cli_test/test_helpers.go index 41d83016..6441f444 100644 --- a/cli_test/test_helpers.go +++ b/cli_test/test_helpers.go @@ -55,6 +55,13 @@ var ( } ) +func init() { + // set the address prefixes + config := sdk.GetConfig() + app.SetBech32AddressPrefixes(config) + config.Seal() +} + //___________________________________________________________________________________ // Fixtures