mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-03 11:30:28 -05:00
Use stretchr/testify not attic-labs/testify (#3677)
stretchr has fixed a bug with the -count flag. I could merge these changes into attic-labs, but it's easier to just use strechr. We forked stretchr a long time ago so that we didn't link in the HTTP testing libraries into the noms binaries (because we were using d.Chk in production code). The HTTP issue doesn't seem to happen anymore, even though we're still using d.Chk.
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestNomsBlobGet(t *testing.T) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type nomsCommitTestSuite struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type nomsDiffTestSuite struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestDs(t *testing.T) {
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/noms/go/util/test"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestNomsLog(t *testing.T) {
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type nomsMergeTestSuite struct {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestNomsRoot(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/noms/go/util/test"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestNomsShow(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestSync(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/util/clienttest"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestVersion(t *testing.T) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/verbose"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNomsSplore(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSerializeRoundTrip(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
package chunks
|
||||
|
||||
import (
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
|
||||
@@ -7,7 +7,7 @@ package chunks
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestChunk(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package chunks
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestMemoryStoreTestSuite(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetRequestBatch(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package chunks
|
||||
import (
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func assertInputInStore(input string, h hash.Hash, s ChunkStore, assert *assert.Assertions) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
// d.Chk.<Method>() -- used in test cases and as assertions
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/nomdl"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNewCommit(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/noms/go/merge"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestLocalDatabase(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestExplicitBranchUsingDatasets(t *testing.T) {
|
||||
|
||||
@@ -16,9 +16,9 @@ import (
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const testAuthToken = "aToken123"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const datasetID = "ds1"
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/golang/snappy"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHandleWriteValue(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHashRoundTrip(t *testing.T) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/marshal"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCommonPrefixCount(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/test"
|
||||
"github.com/attic-labs/noms/go/util/writers"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPatchPathPartCompare(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package hash
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBase32Encode(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHashSliceSort(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestParseError(t *testing.T) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDecode(tt *testing.T) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestEncode(tt *testing.T) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/nomdl"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMarshalTypeType(tt *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestThreeWayMapMerge(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestThreeWayListMerge(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestThreeWaySetMerge(t *testing.T) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type seq interface {
|
||||
|
||||
@@ -7,7 +7,7 @@ package metrics
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHistogramBucketValue(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package nbs
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAWSChunkSource(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/util/sizecache"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAWSTablePersisterPersist(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type storeOpenFn func() chunks.ChunkStore
|
||||
|
||||
@@ -16,13 +16,13 @@ import (
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/nbs"
|
||||
"github.com/attic-labs/noms/go/util/profile"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/dustin/go-humanize"
|
||||
flag "github.com/juju/gnuflag"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const testMemTableSize = 1 << 8
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type tableSpecsByAscendingCount []tableSpec
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type fakeDDB struct {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/util/sizecache"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDynamoTableReaderAt(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestLocalStoreFactory(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFDCache(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func makeFileManifestTempDir(t *testing.T) fileManifest {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFSTableCacheOnOpen(t *testing.T) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFSTableCache(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSizeCache(t *testing.T) {
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/golang/snappy"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMemTableAddHasGetChunk(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMmapTableReader(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package nbs
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPersistingChunkStoreEmpty(t *testing.T) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/constants"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestChunkStoreZeroValue(t *testing.T) {
|
||||
|
||||
@@ -17,9 +17,9 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type mockAWSError string
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestS3TableReaderAt(t *testing.T) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestStats(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package nbs
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPlanCompaction(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package nbs
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var testChunks = [][]byte{[]byte("hello2"), []byte("goodbye2"), []byte("badbye2")}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func buildTable(chunks [][]byte) ([]byte, addr) {
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
"github.com/attic-labs/noms/go/marshal"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/noms/go/util/test"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type QueryGraphQLSuite struct {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func assertParseType(t *testing.T, code string, expected *types.Type) {
|
||||
|
||||
@@ -91,12 +91,12 @@ import (
|
||||
"github.com/attic-labs/noms/go/nbs"
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
testifySuite "github.com/attic-labs/testify/suite"
|
||||
"github.com/shirou/gopsutil/cpu"
|
||||
"github.com/shirou/gopsutil/disk"
|
||||
"github.com/shirou/gopsutil/host"
|
||||
"github.com/shirou/gopsutil/mem"
|
||||
"github.com/stretchr/testify/assert"
|
||||
testifySuite "github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/spec"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type testSuite struct {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/golang/snappy"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type testSloppyEncoder struct {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/datas"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAbsolutePathToAndFromString(t *testing.T) {
|
||||
|
||||
+29
-15
@@ -11,7 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func isEmptyStruct(s types.Struct) bool {
|
||||
@@ -20,6 +20,7 @@ func isEmptyStruct(s types.Struct) bool {
|
||||
|
||||
func TestCreateCommitMetaStructBasic(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
meta, err := CreateCommitMetaStruct(nil, "", "", nil, nil)
|
||||
assert.NoError(err)
|
||||
assert.False(isEmptyStruct(meta))
|
||||
@@ -28,9 +29,10 @@ func TestCreateCommitMetaStructBasic(t *testing.T) {
|
||||
|
||||
func TestCreateCommitMetaStructFromFlags(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
commitMetaDate = time.Now().UTC().Format(CommitMetaDateFormat)
|
||||
commitMetaMessage = "this is a message"
|
||||
commitMetaKeyValueStrings = "k1=v1,k2=v2,k3=v3"
|
||||
|
||||
setCommitMetaFlags(time.Now().UTC().Format(CommitMetaDateFormat), "this is a message", "k1=v1,k2=v2,k3=v3")
|
||||
defer resetCommitMetaFlags()
|
||||
|
||||
meta, err := CreateCommitMetaStruct(nil, "", "", nil, nil)
|
||||
assert.NoError(err)
|
||||
assert.Equal("Struct Meta {\n date: String,\n k1: String,\n k2: String,\n k3: String,\n message: String,\n}",
|
||||
@@ -44,10 +46,6 @@ func TestCreateCommitMetaStructFromFlags(t *testing.T) {
|
||||
|
||||
func TestCreateCommitMetaStructFromArgs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
commitMetaDate = ""
|
||||
commitMetaMessage = ""
|
||||
commitMetaKeyValueStrings = ""
|
||||
commitMetaKeyValuePaths = ""
|
||||
|
||||
dateArg := time.Now().UTC().Format(CommitMetaDateFormat)
|
||||
messageArg := "this is a message"
|
||||
@@ -65,9 +63,9 @@ func TestCreateCommitMetaStructFromArgs(t *testing.T) {
|
||||
|
||||
func TestCreateCommitMetaStructFromFlagsAndArgs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
commitMetaDate = time.Now().UTC().Format(CommitMetaDateFormat)
|
||||
commitMetaMessage = "this is a message"
|
||||
commitMetaKeyValueStrings = "k1=v1p1,k2=v2p2,k4=v4p4"
|
||||
|
||||
setCommitMetaFlags(time.Now().UTC().Format(CommitMetaDateFormat), "this is a message", "k1=v1p1,k2=v2p2,k4=v4p4")
|
||||
defer resetCommitMetaFlags()
|
||||
|
||||
dateArg := time.Now().UTC().Add(time.Hour * -24).Format(CommitMetaDateFormat)
|
||||
messageArg := "this is a message"
|
||||
@@ -90,7 +88,9 @@ func TestCreateCommitMetaStructBadDate(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
testBadDates := func(cliDateString, argDateString string) {
|
||||
commitMetaDate = cliDateString
|
||||
setCommitMetaFlags(cliDateString, "", "")
|
||||
defer resetCommitMetaFlags()
|
||||
|
||||
meta, err := CreateCommitMetaStruct(nil, argDateString, "", nil, nil)
|
||||
assert.Error(err)
|
||||
assert.True(strings.HasPrefix(err.Error(), "Unable to parse date: "))
|
||||
@@ -111,7 +111,9 @@ func TestCreateCommitMetaStructBadMetaStrings(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
testBadMetaSeparator := func(k, v, sep string) {
|
||||
commitMetaKeyValueStrings = fmt.Sprintf("%s%s%s", k, sep, v)
|
||||
setCommitMetaFlags("", "", fmt.Sprintf("%s%s%s", k, sep, v))
|
||||
defer resetCommitMetaFlags()
|
||||
|
||||
meta, err := CreateCommitMetaStruct(nil, "", "", nil, nil)
|
||||
assert.Error(err)
|
||||
assert.True(strings.HasPrefix(err.Error(), "Unable to parse meta value: "))
|
||||
@@ -122,13 +124,15 @@ func TestCreateCommitMetaStructBadMetaStrings(t *testing.T) {
|
||||
testBadMetaSeparator(k, v, ":")
|
||||
testBadMetaSeparator(k, v, "-")
|
||||
|
||||
commitMetaKeyValueStrings = fmt.Sprintf("%s=%s", k, v)
|
||||
setCommitMetaFlags("", "", fmt.Sprintf("%s=%s", k, v))
|
||||
|
||||
meta, err := CreateCommitMetaStruct(nil, "", "", nil, nil)
|
||||
assert.Error(err)
|
||||
assert.True(strings.HasPrefix(err.Error(), "Invalid meta key: "))
|
||||
assert.True(isEmptyStruct(meta))
|
||||
|
||||
commitMetaKeyValueStrings = ""
|
||||
resetCommitMetaFlags()
|
||||
|
||||
metaValues := map[string]string{k: v}
|
||||
meta, err = CreateCommitMetaStruct(nil, "", "", metaValues, nil)
|
||||
assert.Error(err)
|
||||
@@ -143,3 +147,13 @@ func TestCreateCommitMetaStructBadMetaStrings(t *testing.T) {
|
||||
testBadMetaKeys("👀", "who watches the watchers?")
|
||||
testBadMetaKeys("key:", "value")
|
||||
}
|
||||
|
||||
func setCommitMetaFlags(date, message, kvStrings string) {
|
||||
commitMetaDate = date
|
||||
commitMetaMessage = message
|
||||
commitMetaKeyValueStrings = kvStrings
|
||||
}
|
||||
|
||||
func resetCommitMetaFlags() {
|
||||
setCommitMetaFlags("", "", "")
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/attic-labs/noms/go/datas"
|
||||
"github.com/attic-labs/noms/go/nbs"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMemDatabaseSpec(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBlobReadWriteFuzzer(t *testing.T) {
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type countingReader struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCodecWriteNumber(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/attic-labs/testify/suite"
|
||||
import "github.com/stretchr/testify/suite"
|
||||
|
||||
type collectionTestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
@@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestContainCommonSupertype(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var prefix = []byte{0x01, 0x02, 0x03, 0x04}
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func assertDiff(assert *assert.Assertions, last []uint64, current []uint64, expect []Splice) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/util/test"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func assertWriteHRSEqual(t *testing.T, expected string, v Value) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type nomsTestReader struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestValueEquals(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestEnsureHash(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGraphBuilderFindIndex(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func getTestVals(vrw ValueReadWriter) []Value {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func listOfInts(vrw ValueReadWriter, vals ...int) List {
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestListIterator(t *testing.T) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const testListSize = 5000
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMapIterator(t *testing.T) {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/chunks"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const testMapSize = 8000
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/d"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
func TestOpCache(t *testing.T) {
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/attic-labs/testify/suite"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -59,6 +60,7 @@ func accumulateOrderedSequenceDiffChanges(o1, o2 orderedSequence, df diffFn) (ad
|
||||
}
|
||||
|
||||
func (suite *diffTestSuite) TestDiff() {
|
||||
fmt.Println("dbg: TestDiff")
|
||||
vs := newTestValueStore()
|
||||
|
||||
type valFn func(int, int, int) ValueSlice
|
||||
@@ -135,8 +137,11 @@ func TestOrderedSequencesSubset(t *testing.T) {
|
||||
0, lengthOfNumbersTest/2, 1,
|
||||
0, lengthOfNumbersTest, 1,
|
||||
lengthOfNumbersTest/2, 0, 0)
|
||||
fmt.Println("dbg: ts1")
|
||||
suite.Run(t, ts1)
|
||||
fmt.Println("dbg: ts2")
|
||||
suite.Run(t, ts2)
|
||||
fmt.Println("dbg: done")
|
||||
ts1.Equal(ts1.added, ts2.removed, "added and removed in reverse order diff")
|
||||
ts1.Equal(ts1.removed, ts2.added, "removed and added in reverse order diff")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/noms/go/hash"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func hashIdx(v Value) string {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
"github.com/attic-labs/noms/go/perf/suite"
|
||||
"github.com/attic-labs/noms/go/types"
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type perfSuite struct {
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPrimitives(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRefByHeight(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ package types
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/attic-labs/testify/assert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRefInList(t *testing.T) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user