[#xx] Avoid manual management of files in tests
Some checks failed
Vulncheck / Vulncheck (pull_request) Successful in 2m36s
Build / Build Components (1.21) (pull_request) Successful in 3m33s
DCO action / DCO (pull_request) Successful in 3m33s
Tests and linters / Staticcheck (pull_request) Successful in 4m15s
Tests and linters / Lint (pull_request) Successful in 5m31s
Build / Build Components (1.20) (pull_request) Successful in 7m2s
Tests and linters / Tests with -race (pull_request) Failing after 8m51s
Tests and linters / Tests (1.20) (pull_request) Successful in 9m55s
Tests and linters / Tests (1.21) (pull_request) Successful in 10m6s
Some checks failed
Vulncheck / Vulncheck (pull_request) Successful in 2m36s
Build / Build Components (1.21) (pull_request) Successful in 3m33s
DCO action / DCO (pull_request) Successful in 3m33s
Tests and linters / Staticcheck (pull_request) Successful in 4m15s
Tests and linters / Lint (pull_request) Successful in 5m31s
Build / Build Components (1.20) (pull_request) Successful in 7m2s
Tests and linters / Tests with -race (pull_request) Failing after 8m51s
Tests and linters / Tests (1.20) (pull_request) Successful in 9m55s
Tests and linters / Tests (1.21) (pull_request) Successful in 10m6s
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
376f03a445
commit
ae8be495c8
13 changed files with 17 additions and 79 deletions
|
@ -2,6 +2,7 @@ package meta_test
|
|||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
|
@ -40,11 +41,9 @@ func testSelect(t *testing.T, db *meta.DB, cnr cid.ID, fs objectSDK.SearchFilter
|
|||
}
|
||||
|
||||
func newDB(t testing.TB, opts ...meta.Option) *meta.DB {
|
||||
path := t.Name()
|
||||
|
||||
bdb := meta.New(
|
||||
append([]meta.Option{
|
||||
meta.WithPath(path),
|
||||
meta.WithPath(filepath.Join(t.TempDir(), "metabase")),
|
||||
meta.WithPermissions(0600),
|
||||
meta.WithEpochState(epochState{}),
|
||||
}, opts...)...,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue