From 6ce57fae074e65cd539e5f9c8ceb7429470691e8 Mon Sep 17 00:00:00 2001 From: Pham Anh Minh <1phamminh0811@gmail.com> Date: Sun, 28 Jan 2024 15:00:06 +0700 Subject: [PATCH] lint --- tests/e2e/e2e_test.go | 2 +- tests/e2e/initialization/config.go | 2 +- tests/e2e/util/io.go | 9 --------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 59ccdaa86..23e099312 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -73,7 +73,7 @@ func (s *IntegrationTestSuite) TestIBCWasmHooks() { } denom := totalFunds.(map[string]interface{})["denom"].(string) // check if denom is luna token ibc - return sdk.NewInt(int64(amount)).Equal(transferAmount) && denom == initialization.TerraIBCDenom + return sdk.NewInt(amount).Equal(transferAmount) && denom == initialization.TerraIBCDenom }, 10*time.Second, 10*time.Millisecond, diff --git a/tests/e2e/initialization/config.go b/tests/e2e/initialization/config.go index d64d227dc..a41eb6273 100644 --- a/tests/e2e/initialization/config.go +++ b/tests/e2e/initialization/config.go @@ -265,7 +265,7 @@ func initGenesis(chain *internalChain, forkHeight int) error { // write the updated genesis file to each validator for _, val := range chain.nodes { - if err := util.WriteFile(filepath.Join(val.configDir(), "config", "genesis.json"), genesisJson); err != nil { + if err := util.WritePublicFile(filepath.Join(val.configDir(), "config", "genesis.json"), genesisJson); err != nil { return err } } diff --git a/tests/e2e/util/io.go b/tests/e2e/util/io.go index 5fd8f7809..d1f0555cf 100644 --- a/tests/e2e/util/io.go +++ b/tests/e2e/util/io.go @@ -32,15 +32,6 @@ func CopyFile(src, dst string) (int64, error) { return nBytes, err } -func WriteFile(path string, body []byte) error { - _, err := os.Create(path) - if err != nil { - return err - } - - return os.WriteFile(path, body, 0o600) -} - func WritePublicFile(path string, body []byte) error { _, err := os.Create(path) if err != nil {