From 6f1cdeb336117fad0d29a5eaaf1eb98719b134c7 Mon Sep 17 00:00:00 2001 From: rhuairahrighairigh Date: Fri, 4 Oct 2019 13:44:28 -0400 Subject: [PATCH] set address prefixes for tests --- app/sim_test.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/sim_test.go b/app/sim_test.go index 298acccc..387e1477 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -58,8 +58,18 @@ const ( OpWeightMsgUnjail = "op_weight_msg_unjail" ) -func init() { - simapp.GetSimulatorFlags() +// TestMain runs setup and teardown code before all tests. +func TestMain(m *testing.M) { + // set prefixes + config := sdk.GetConfig() + SetBech32AddressPrefixes(config) + config.Seal() + // load the values from simulation specific flags + simapp.GetSimulatorFlags() + + // run tests + exitCode := m.Run() + os.Exit(exitCode) } func testAndRunTxs(app *App, config simulation.Config) []simulation.WeightedOperation {