Fix internal imports: github.com -> git.marketally.com
This commit is contained in:
parent
783d4c35cf
commit
05a175aab2
|
|
@ -3,8 +3,8 @@ package bbolt
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/freelist"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/freelist"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTx_allocatePageStats(t *testing.T) {
|
func TestTx_allocatePageStats(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// flock acquires an advisory lock on a file descriptor.
|
// flock acquires an advisory lock on a file descriptor.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fdatasync flushes written data to a file descriptor.
|
// fdatasync flushes written data to a file descriptor.
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure that a bucket that gets a non-existent key returns nil.
|
// Ensure that a bucket that gets a non-existent key returns nil.
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
type checkOptions struct {
|
type checkOptions struct {
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCheckCommand_Run(t *testing.T) {
|
func TestCheckCommand_Run(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newInspectCommand() *cobra.Command {
|
func newInspectCommand() *cobra.Command {
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestInspect(t *testing.T) {
|
func TestInspect(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/surgeon"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/surgeon"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/surgeon"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/surgeon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newSurgeryFreelistCommand() *cobra.Command {
|
func newSurgeryFreelistCommand() *cobra.Command {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSurgery_Freelist_Abandon(t *testing.T) {
|
func TestSurgery_Freelist_Abandon(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSurgery_Meta_Validate(t *testing.T) {
|
func TestSurgery_Meta_Validate(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSurgery_RevertMetaPage(t *testing.T) {
|
func TestSurgery_RevertMetaPage(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/version"
|
"git.marketally.com/tutus-one/tutus-bolt/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newVersionCommand() *cobra.Command {
|
func newVersionCommand() *cobra.Command {
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"unicode"
|
"unicode"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,14 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
main "github.com/tutus-one/tutus-bolt/cmd/bbolt"
|
main "git.marketally.com/tutus-one/tutus-bolt/cmd/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure the "info" command can print information about a database.
|
// Ensure the "info" command can print information about a database.
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// pageCommand represents the "page" command execution.
|
// pageCommand represents the "page" command execution.
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func loadMetaPage(t *testing.T, dbPath string, pageID uint64) *common.Meta {
|
func loadMetaPage(t *testing.T, dbPath string, pageID uint64) *common.Meta {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cursor represents an iterator that can traverse over all key/value pairs in a bucket
|
// Cursor represents an iterator that can traverse over all key/value pairs in a bucket
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestCursor_RepeatOperations verifies that a cursor can continue to
|
// TestCursor_RepeatOperations verifies that a cursor can continue to
|
||||||
|
|
|
||||||
6
db.go
6
db.go
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
fl "github.com/tutus-one/tutus-bolt/internal/freelist"
|
fl "git.marketally.com/tutus-one/tutus-bolt/internal/freelist"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The time elapsed between consecutive file locking attempts.
|
// The time elapsed between consecutive file locking attempts.
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
// pageSize is the size of one page in the data file.
|
// pageSize is the size of one page in the data file.
|
||||||
|
|
@ -1360,7 +1360,7 @@ func TestDBUnmap(t *testing.T) {
|
||||||
require.NoError(t, db.DB.Close())
|
require.NoError(t, db.DB.Close())
|
||||||
|
|
||||||
// Ignore the following error:
|
// Ignore the following error:
|
||||||
// Error: copylocks: call of reflect.ValueOf copies lock value: github.com/tutus-one/tutus-bolt.DB contains sync.Once contains sync.Mutex (govet)
|
// Error: copylocks: call of reflect.ValueOf copies lock value: git.marketally.com/tutus-one/tutus-bolt.DB contains sync.Once contains sync.Mutex (govet)
|
||||||
//nolint:govet
|
//nolint:govet
|
||||||
v := reflect.ValueOf(*db.DB)
|
v := reflect.ValueOf(*db.DB)
|
||||||
dataref := v.FieldByName("dataref")
|
dataref := v.FieldByName("dataref")
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOpenWithPreLoadFreelist(t *testing.T) {
|
func TestOpenWithPreLoadFreelist(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package bbolt
|
package bbolt
|
||||||
|
|
||||||
import "github.com/tutus-one/tutus-bolt/errors"
|
import "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
|
|
||||||
// These errors can be returned when opening or calling methods on a DB.
|
// These errors can be returned when opening or calling methods on a DB.
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var statsFlag = flag.Bool("stats", false, "show performance stats")
|
var statsFlag = flag.Bool("stats", false, "show performance stats")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Meta struct {
|
type Meta struct {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type array struct {
|
type array struct {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure that a freelist can find contiguous blocks of pages.
|
// Ensure that a freelist can find contiguous blocks of pages.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package freelist
|
package freelist
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ReadWriter interface {
|
type ReadWriter interface {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestFreelistType is used as a env variable for test to indicate the backend type
|
// TestFreelistType is used as a env variable for test to indicate the backend type
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// pidSet holds the set of starting pgids which have the same span size
|
// pidSet holds the set of starting pgids which have the same span size
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFreelistHashmap_init_panics(t *testing.T) {
|
func TestFreelistHashmap_init_panics(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type txPending struct {
|
type txPending struct {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package surgeon
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CopyPage(path string, srcPage common.Pgid, target common.Pgid) error {
|
func CopyPage(path string, srcPage common.Pgid, target common.Pgid) error {
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/surgeon"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/surgeon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRevertMetaPage(t *testing.T) {
|
func TestRevertMetaPage(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
type XRay struct {
|
type XRay struct {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt"
|
"git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/surgeon"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/surgeon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFindPathsToKey(t *testing.T) {
|
func TestFindPathsToKey(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/surgeon"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/surgeon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTx_RecursivelyCheckPages_MisplacedPage(t *testing.T) {
|
func TestTx_RecursivelyCheckPages_MisplacedPage(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt"
|
"git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
2
node.go
2
node.go
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// node represents an in-memory, deserialized page.
|
// node represents an in-memory, deserialized page.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure that a node can insert a key/value.
|
// Ensure that a node can insert a key/value.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package bbolt_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimulateNoFreeListSync_1op_1p(t *testing.T) {
|
func TestSimulateNoFreeListSync_1op_1p(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
|
func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
testutils "github.com/tutus-one/tutus-bolt/tests/utils"
|
testutils "git.marketally.com/tutus-one/tutus-bolt/tests/utils"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/errors"
|
"git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
gofail "go.etcd.io/gofail/runtime"
|
gofail "go.etcd.io/gofail/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
testutils "github.com/tutus-one/tutus-bolt/tests/utils"
|
testutils "git.marketally.com/tutus-one/tutus-bolt/tests/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/tests/dmflakey"
|
"git.marketally.com/tutus-one/tutus-bolt/tests/dmflakey"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
|
||||||
4
tx.go
4
tx.go
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tx represents a read-only or read/write transaction on the database.
|
// Tx represents a read-only or read/write transaction on the database.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Check performs several consistency checks on the database for this transaction.
|
// Check performs several consistency checks on the database for this transaction.
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/tutus-one/tutus-bolt"
|
"git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/guts_cli"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/guts_cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTx_Check_CorruptPage(t *testing.T) {
|
func TestTx_Check_CorruptPage(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
berrors "github.com/tutus-one/tutus-bolt/errors"
|
berrors "git.marketally.com/tutus-one/tutus-bolt/errors"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
|
// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/btesting"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/btesting"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMlock_DbOpen(t *testing.T) {
|
func TestMlock_DbOpen(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package bbolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
bolt "github.com/tutus-one/tutus-bolt"
|
bolt "git.marketally.com/tutus-one/tutus-bolt"
|
||||||
"github.com/tutus-one/tutus-bolt/internal/common"
|
"git.marketally.com/tutus-one/tutus-bolt/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// `dumpBucket` dumps all the data, including both key/value data
|
// `dumpBucket` dumps all the data, including both key/value data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue