Skip to content

Commit

Permalink
testing: group (reorder) imports.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Tabor <[email protected]>
  • Loading branch information
ptabor committed Dec 28, 2022
1 parent 26cc5e3 commit 93380c5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cursor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"encoding/binary"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"log"
"os"
"reflect"
Expand All @@ -13,6 +12,7 @@ import (
"testing/quick"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// Ensure that a cursor can return a reference to the bucket that created it.
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/tools v0.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4=
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
6 changes: 4 additions & 2 deletions internal/btesting/btesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package btesting
import (
"flag"
"fmt"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
"os"
"path/filepath"
"regexp"
"testing"
"time"

"github.com/stretchr/testify/require"

bolt "go.etcd.io/bbolt"
)

var statsFlag = flag.Bool("stats", false, "show performance stats")
Expand Down
2 changes: 1 addition & 1 deletion simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package bbolt_test
import (
"bytes"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"math/rand"
"sync"
"sync/atomic"
"testing"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
Expand Down
2 changes: 1 addition & 1 deletion tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"errors"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"log"
"os"
"testing"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
Expand Down
5 changes: 3 additions & 2 deletions unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package bbolt_test

import (
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"testing"

bolt "go.etcd.io/bbolt"
"golang.org/x/sys/unix"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

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

0 comments on commit 93380c5

Please sign in to comment.