Skip to content

Commit

Permalink
test: fix the broken test (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f authored Feb 16, 2024
1 parent f008314 commit e845bc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
12 changes: 1 addition & 11 deletions store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"path"
"testing"

"github.com/kehiy/RoboPac/config"
"github.com/kehiy/RoboPac/log"
"github.com/kehiy/RoboPac/store"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -44,9 +43,6 @@ func setup(t *testing.T) store.IStore {
tempDir, err := os.MkdirTemp("", "RoboPAC")
require.NoError(t, err)

_, err = copy("./test/.env.test", path.Join(tempDir, "/.env"))
require.NoError(t, err)

_, err = copy("./test/claimers.json", path.Join(tempDir, "/claimers.json"))
require.NoError(t, err)

Expand All @@ -59,16 +55,10 @@ func setup(t *testing.T) store.IStore {
_, err = copy("./test/wallet.json", path.Join(tempDir, "/wallet.json"))
require.NoError(t, err)

fmt.Println("store location: " + tempDir)
_ = os.Chdir(tempDir)

cfg, err := config.Load(".env")
require.NoError(t, err)

log.InitGlobalLogger()
logger := log.NewSubLogger("store_test")

store, err := store.NewStore(cfg.StorePath, logger)
store, err := store.NewStore(tempDir, logger)
require.NoError(t, err)

return store
Expand Down
9 changes: 0 additions & 9 deletions store/test/.env.test

This file was deleted.

0 comments on commit e845bc0

Please sign in to comment.