From 01c138e92e98939c465be1a66e7940703ab83bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=2E=20=C3=96zt=C3=BCrk?= Date: Thu, 17 Mar 2022 23:20:09 +0300 Subject: [PATCH] fix(cosmosgen): fix tests --- integration/cosmosgen/cosmosgen_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/integration/cosmosgen/cosmosgen_test.go b/integration/cosmosgen/cosmosgen_test.go index 633ac59ffd..e41882fc06 100644 --- a/integration/cosmosgen/cosmosgen_test.go +++ b/integration/cosmosgen/cosmosgen_test.go @@ -13,9 +13,11 @@ import ( func TestCosmosGen(t *testing.T) { var ( - env = envtest.New(t) - path = env.Scaffold("blog") + env = envtest.New(t) + path = env.Scaffold("blog") + dirGenerated = filepath.Join(path, "vue/src/store/generated") ) + const ( withMsgModuleName = "withmsg" withoutMsgModuleName = "withoutmsg" @@ -91,6 +93,8 @@ func TestCosmosGen(t *testing.T) { )), )) + require.NoError(t, os.RemoveAll(dirGenerated)) + env.Must(env.Exec("generate vuex", step.NewSteps(step.New( step.Exec( @@ -105,7 +109,6 @@ func TestCosmosGen(t *testing.T) { var expectedCosmosModules = []string{ "cosmos.auth.v1beta1", - "cosmos.authz.v1beta1", "cosmos.bank.v1beta1", "cosmos.base.tendermint.v1beta1", "cosmos.crisis.v1beta1", @@ -128,7 +131,6 @@ func TestCosmosGen(t *testing.T) { "test.blog.withoutmsg", } - dirGenerated := filepath.Join(path, "vue/src/store/generated") for _, chainModule := range expectedCustomModules { _, statErr := os.Stat(filepath.Join(dirGenerated, "test/blog", chainModule)) require.False(t, os.IsNotExist(statErr), fmt.Sprintf("the %s vuex store should have be generated", chainModule))