commit
04a5881b07
|
@ -3,7 +3,7 @@ os:
|
|||
- linux
|
||||
# - osx
|
||||
go:
|
||||
- '1.12.x'
|
||||
- '1.13.x'
|
||||
services:
|
||||
- docker
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.12-stretch AS builder
|
||||
FROM golang:1.13-stretch AS builder
|
||||
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
||||
|
||||
# This dockerfile builds and runs ipfs-cluster-service.
|
||||
|
@ -31,9 +31,6 @@ RUN apt-get update && apt-get install -y ca-certificates
|
|||
FROM busybox:1-glibc
|
||||
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
||||
|
||||
# This is the container which just puts the previously
|
||||
# built binaries on the go-ipfs-container.
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.12-stretch AS builder
|
||||
FROM golang:1.13-stretch AS builder
|
||||
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
||||
|
||||
# This dockerfile builds cluster and runs it along with go-ipfs.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.12-stretch AS builder
|
||||
FROM golang:1.13-stretch AS builder
|
||||
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
||||
|
||||
# This build state just builds the cluster binaries
|
||||
|
|
2
go.mod
2
go.mod
|
@ -72,3 +72,5 @@ require (
|
|||
gonum.org/v1/gonum v0.0.0-20190926113837-94b2bbd8ac13
|
||||
gonum.org/v1/plot v0.0.0-20190615073203-9aa86143727f
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
|
|
@ -84,7 +84,17 @@ func (lg *logFacilities) Set(value string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// TestMain runs test initialization. Since Go1.13 we cannot run this on init()
|
||||
// as flag.Parse() does not work well there
|
||||
// (see https://golang.org/src/testing/testing.go#L211)
|
||||
func TestMain(m *testing.M) {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
ReadyTimeout = 11 * time.Second
|
||||
|
||||
// GossipSub needs to heartbeat to discover newly connected hosts
|
||||
// This speeds things up a little.
|
||||
pubsub.GossipSubHeartbeatInterval = 50 * time.Millisecond
|
||||
|
||||
flag.Var(&customLogLvlFacilities, "logfacs", "use -logLevel for only the following log facilities; comma-separated")
|
||||
flag.StringVar(&logLevel, "loglevel", logLevel, "default log level for tests")
|
||||
flag.IntVar(&nClusters, "nclusters", nClusters, "number of clusters to use")
|
||||
|
@ -93,8 +103,6 @@ func init() {
|
|||
flag.StringVar(&consensus, "consensus", consensus, "consensus implementation")
|
||||
flag.Parse()
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
if len(customLogLvlFacilities) <= 0 {
|
||||
for f := range LoggingFacilities {
|
||||
SetFacilityLogLevel(f, logLevel)
|
||||
|
@ -115,11 +123,8 @@ func init() {
|
|||
continue
|
||||
}
|
||||
}
|
||||
ReadyTimeout = 11 * time.Second
|
||||
|
||||
// GossipSub needs to heartbeat to discover newly connected hosts
|
||||
// This speeds things up a little.
|
||||
pubsub.GossipSubHeartbeatInterval = 50 * time.Millisecond
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func checkErr(t *testing.T, err error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user