Skip to content

Commit

Permalink
updated constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Feb 28, 2021
1 parent eeb8ff8 commit d5ca695
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/address/bolt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ import (
"testing"
)

const tmpDbPath = "/tmp/mockboltdb.db"

func TestBoltResolver(t *testing.T) {
_ = os.Setenv("USE_BOLT", "1")
_ = os.Setenv("BOLT_DB_FILE", "/tmp/mockdb.db")
_ = os.Setenv("BOLT_DB_FILE", tmpDbPath)
SetDefaultRepository(nil)

_ = os.Remove("/tmp/mockdb.db")
_ = os.Remove(tmpDbPath)
db := NewBoltResolver()
runRepositoryCreateUpdateTest(t, db)

_ = os.Remove("/tmp/mockdb.db")
_ = os.Remove(tmpDbPath)
db = NewBoltResolver()
runRepositoryDeletionTests(t, db)

_ = os.Remove("/tmp/mockdb.db")
_ = os.Remove(tmpDbPath)
}

0 comments on commit d5ca695

Please sign in to comment.