Skip to content

Commit

Permalink
Merge pull request #123 from ipfs/uci/update-go
Browse files Browse the repository at this point in the history
ci: uci/update-go
  • Loading branch information
web3-bot authored Mar 14, 2024
2 parents c5a4898 + 330e03e commit 7ff3885
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
21 changes: 10 additions & 11 deletions ds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package badger
import (
"bytes"
"context"
"crypto/rand"
"fmt"
"io/ioutil"
"math/rand"
"os"
"sort"
"testing"
Expand Down Expand Up @@ -33,10 +32,10 @@ var testcases = map[string]string{
// returns datastore, and a function to call on exit.
// (this garbage collects). So:
//
// d, close := newDS(t)
// defer close()
// d, close := newDS(t)
// defer close()
func newDS(t *testing.T) (*Datastore, func()) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -337,7 +336,7 @@ func TestBatching(t *testing.T) {
}

func TestBatchingRequired(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -616,7 +615,7 @@ func TestGC(t *testing.T) {
// this interval is not configurable, we re-open the database
// (the size is always calculated on Open) to make things quick.
func TestDiskUsage(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -645,7 +644,7 @@ func TestDiskUsage(t *testing.T) {
}

func TestTxnDiscard(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -678,7 +677,7 @@ func TestTxnDiscard(t *testing.T) {
}

func TestTxnCommit(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -713,7 +712,7 @@ func TestTxnCommit(t *testing.T) {
}

func TestTxnBatch(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -767,7 +766,7 @@ func TestTxnBatch(t *testing.T) {
}

func TestTTL(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
path, err := os.MkdirTemp(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
Expand Down
18 changes: 17 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,20 @@ require (
github.com/jbenet/goprocess v0.1.4
)

go 1.13
require (
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/dgraph-io/ristretto v0.0.2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/ipfs/go-detect-race v0.0.1 // indirect
github.com/pkg/errors v0.8.1 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
go.uber.org/zap v1.14.1 // indirect
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
)

go 1.21

0 comments on commit 7ff3885

Please sign in to comment.