Skip to content

Commit

Permalink
vendor: remove camlistore and add glide config
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 8, 2016
1 parent 8164b50 commit ad10ca7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ go:
- 1.6
- tip


matrix:
allow_failures:
- go: tip
- go: 1.4

install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get github.com/pierrre/gotestcover
- go get github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/pierrre/gotestcover
- go get -t ./...

script:
Expand Down
19 changes: 17 additions & 2 deletions container.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
package dockertest

import (
"camlistore.org/pkg/netutil"
"fmt"
"os/exec"
"strings"
"time"
"net"
)

// AwaitReachable tries to make a TCP connection to addr regularly.
// It returns an error if it's unable to make a connection before maxWait.
func AwaitReachable(addr string, maxWait time.Duration) error {
done := time.Now().Add(maxWait)
for time.Now().Before(done) {
c, err := net.Dial("tcp", addr)
if err == nil {
c.Close()
return nil
}
time.Sleep(100 * time.Millisecond)
}
return fmt.Errorf("%v unreachable for %v", addr, maxWait)
}

// ContainerID represents a container and offers methods like Kill or IP.
type ContainerID string

Expand Down Expand Up @@ -56,7 +71,7 @@ func (c ContainerID) lookup(ports []int, timeout time.Duration) (ip string, err
}
for _, port := range ports {
addr := fmt.Sprintf("%s:%d", ip, port)
err = netutil.AwaitReachable(addr, timeout)
err = AwaitReachable(addr, timeout)
if err != nil {
return
}
Expand Down
39 changes: 39 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package: github.com/ory-am/dockertest
import:
- package: github.com/go-errors/errors
- package: github.com/go-sql-driver/mysql
version: ~1.2.0
- package: github.com/lib/pq
- package: github.com/ory-am/common
subpackages:
- env
- package: github.com/pborman/uuid
version: ~1.0.0
testImport:
- package: github.com/dancannon/gorethink
version: ~2.1.3
- package: github.com/garyburd/redigo
version: ~1.0.0
subpackages:
- redis
- package: github.com/go-stomp/stomp
version: ~1.0.1
- package: github.com/gocql/gocql
- package: github.com/hashicorp/consul
version: ~0.7.0-test2
subpackages:
- api
- package: github.com/mattbaird/elastigo
version: ~1.0.0
subpackages:
- lib
- package: github.com/samuel/go-zookeeper
subpackages:
- zk
- package: github.com/streadway/amqp
- package: github.com/stretchr/testify
version: ~1.1.3
subpackages:
- assert
- require
- package: gopkg.in/mgo.v2

0 comments on commit ad10ca7

Please sign in to comment.