Unverified Commit a1533102 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #79 from ipfs/feat/update-ci

ci: use the latest standard travis scripts
parents 928570c7 74d2feda
os:
- linux
sudo: false
language: go
go:
- 1.8
- tip
- 1.9.x
install:
- make deps
script:
- make test
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
cache:
directories:
- $GOPATH/src/gx
notifications:
email: false
env: TEST_NO_FUSE=1 TEST_VERBOSE=1
env: GOTFLAGS="-race -cpu=5"
test: deps
go test -race -v ./...
export IPFS_API ?= v04x.ipfs.io
gx:
......@@ -10,5 +7,3 @@ gx:
deps: gx
gx --verbose install --global
gx-go rewrite
go get -t ./...
......@@ -4,10 +4,9 @@ import (
"bytes"
"testing"
. "launchpad.net/gocheck"
. "github.com/go-check/check"
ds "github.com/ipfs/go-datastore"
fs "github.com/ipfs/go-datastore/fs"
query "github.com/ipfs/go-datastore/query"
)
......@@ -23,15 +22,15 @@ var _ = Suite(&DSSuite{})
func (ks *DSSuite) SetUpTest(c *C) {
ks.dir = c.MkDir()
ks.ds, _ = fs.NewDatastore(ks.dir)
ks.ds, _ = NewDatastore(ks.dir)
}
func (ks *DSSuite) TestOpen(c *C) {
_, err := fs.NewDatastore("/tmp/foo/bar/baz")
_, err := NewDatastore("/tmp/foo/bar/baz")
c.Assert(err, Not(Equals), nil)
// setup ds
_, err = fs.NewDatastore(ks.dir)
_, err = NewDatastore(ks.dir)
c.Assert(err, Equals, nil)
}
......
......@@ -5,7 +5,7 @@ import (
"sort"
"testing"
. "launchpad.net/gocheck"
. "github.com/go-check/check"
ds "github.com/ipfs/go-datastore"
kt "github.com/ipfs/go-datastore/keytransform"
......
......@@ -5,8 +5,8 @@ import (
"testing"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/query"
mount "github.com/ipfs/go-datastore/mount"
"github.com/ipfs/go-datastore/query"
dstest "github.com/ipfs/go-datastore/test"
)
......@@ -379,15 +379,15 @@ func TestMaintenanceFunctions(t *testing.T) {
{Prefix: datastore.NewKey("/"), Datastore: mapds},
})
if err:= m.Check(); err.Error() != "checking datastore at /: test error" {
if err := m.Check(); err.Error() != "checking datastore at /: test error" {
t.Errorf("Unexpected Check() error: %s", err)
}
if err:= m.CollectGarbage(); err.Error() != "gc on datastore at /: test error" {
if err := m.CollectGarbage(); err.Error() != "gc on datastore at /: test error" {
t.Errorf("Unexpected CollectGarbage() error: %s", err)
}
if err:= m.Scrub(); err.Error() != "scrubbing datastore at /: test error" {
if err := m.Scrub(); err.Error() != "scrubbing datastore at /: test error" {
t.Errorf("Unexpected Scrub() error: %s", err)
}
}
......@@ -5,7 +5,7 @@ import (
"sort"
"testing"
. "launchpad.net/gocheck"
. "github.com/go-check/check"
ds "github.com/ipfs/go-datastore"
ns "github.com/ipfs/go-datastore/namespace"
......
......@@ -18,6 +18,12 @@
"hash": "QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP",
"name": "goprocess",
"version": "1.0.0"
},
{
"author": "gustavo",
"hash": "QmYBJ8BXPDTMnzLFdv4rS5kbR1fUFASDVDpK7ZbeWMx6hq",
"name": "go-check",
"version": "1.0.0"
}
],
"gxVersion": "0.7.0",
......
package query
import (
"reflect"
"strings"
"testing"
"reflect"
)
var sampleKeys = []string{
......@@ -184,4 +184,3 @@ func getKeysViaChan(rs Results) []string {
}
return ret
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment