Skip to content

Commit

Permalink
Merge pull request #860 from ava-labs/v1.4.6-rollout
Browse files Browse the repository at this point in the history
fix unit test
  • Loading branch information
StephenButtolph authored May 25, 2021
2 parents a17d17c + 1eecc4c commit a134365
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions database/manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,17 @@ func TestNewInvalidMemberPresent(t *testing.T) {
err = db1.Close()
assert.NoError(t, err)

_, err = os.Create(path.Join(dir, "dummy"))
f, err := os.Create(path.Join(dir, "dummy"))
assert.NoError(t, err)

_, err = New(dir, logging.NoLog{}, v1, true)
err = f.Close()
assert.NoError(t, err)

db, err := New(dir, logging.NoLog{}, v1, true)
assert.NoError(t, err, "expected not to error with a non-directory file being present")

err = db.Close()
assert.NoError(t, err)
}

func TestNewSortsDatabases(t *testing.T) {
Expand Down

0 comments on commit a134365

Please sign in to comment.