diff --git a/.circleci/config.yml b/.circleci/config.yml index d3699778f..8789fa1fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -192,16 +192,16 @@ workflows: requires: - setup - test: - name: test-golang-1.13 + name: test-golang-1.15 resource_class: xlarge - golang_version: 1.13.15 + golang_version: 1.15.3 requires: - setup filters: tags: only: /^v.*/ - test: - name: test-golang-1.14 + name: test-golang-1.14.9 resource_class: xlarge golang_version: 1.14.9 requires: @@ -216,7 +216,7 @@ workflows: # name: test-golang-<< matrix.golang_version >> # matrix: # parameters: - # golang_version: ["1.14.9", "1.13.15"] + # golang_version: ["1.14.9", "1.15.3"] - test: name: test-race test_make_target: test-race @@ -248,7 +248,7 @@ workflows: requires: - linter - check-license-headers - - test-golang-1.14 + - test-golang-1.14.9 - dockerhub-upload-unstable: context: molecula requires: diff --git a/Dockerfile b/Dockerfile index a0950ffed..33df2d063 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.13.0 as builder +FROM golang:1.15.3 as builder ARG BUILD_FLAGS ARG MAKE_FLAGS diff --git a/Makefile b/Makefile index b1b7d567c..6d9afe8d0 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,11 @@ vendor: go.mod # Run test suite test: - go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v + GODEBUG=x509ignoreCN=0 go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v # Run test suite with race flag test-race: - go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -race -timeout 60m -v + GODEBUG=x509ignoreCN=0 go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -race -timeout 60m -v testv: topt testvsub @@ -57,7 +57,7 @@ testvsub: set -e; for i in boltdb ctl http pg pql rbf roaring server sql txkey; do \ echo; echo "___ testing subpkg $$i"; \ cd $$i; pwd; \ - go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout 60m || break; \ + GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout 60m || break; \ echo; echo "999 done testing subpkg $$i"; \ cd ..; \ done @@ -66,7 +66,7 @@ testvsub-race: set -e; for i in boltdb ctl http pg pql rbf roaring server sql txkey; do \ echo; echo "___ testing subpkg $$i -race"; \ cd $$i; pwd; \ - go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout 60m || break; \ + GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout 60m || break; \ echo; echo "999 done testing subpkg $$i -race"; \ cd ..; \ done @@ -75,7 +75,7 @@ tour: ./tournament.sh bench: - go test ./... -bench=. -run=NoneZ -timeout=127m $(TESTFLAGS) + GODEBUG=x509ignoreCN=0 go test ./... -bench=. -run=NoneZ -timeout=127m $(TESTFLAGS) # Run test suite with coverage enabled cover: @@ -205,20 +205,20 @@ pilosa-fsck: # Run Pilosa tests inside Docker container docker-test: - docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) ./... + docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) ./... # Must use bash in order to -o pipefail; otherwise the tee will hide red tests. # run top tests, not subdirs. print summary red/green after. # The \-\-\- FAIL avoids counting the extra two FAIL strings at then bottom of log.topt. topt: mv log.topt.roar log.topt.roar.prev || true - $(eval SHELL:=/bin/bash) set -o pipefail; go test -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.roar + $(eval SHELL:=/bin/bash) set -o pipefail; GODEBUG=x509ignoreCN=0 go test -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.roar @echo " log.topt.roar green: \c"; cat log.topt.roar | grep PASS |wc -l @echo " log.topt.roar red: \c"; cat log.topt.roar | grep '\-\-\- FAIL' | wc -l topt-race: mv log.topt.race log.topt.race.prev || true - $(eval SHELL:=/bin/bash) set -o pipefail; go test -race -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.race + $(eval SHELL:=/bin/bash) set -o pipefail; GODEBUG=x509ignoreCN=0 go test -race -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.race @echo " log.topt.race green: \c"; cat log.topt.race | grep PASS |wc -l @echo " log.topt.race red: \c"; cat log.topt.race | grep '\-\-\- FAIL' | wc -l diff --git a/server/testdata/certs/README.md b/server/testdata/certs/README.md index 6e1a23d30..98f685f56 100644 --- a/server/testdata/certs/README.md +++ b/server/testdata/certs/README.md @@ -10,3 +10,5 @@ certstrap --depot-path certs sign "localhost" --CA pilosa-ca --expires "100 year dev-25ea708a (built with go 1.13) + +`GODEBUG=x509ignoreCN=0` is needed to run server tests since go 1.15 to avoid certificate errors. diff --git a/txfactory.go b/txfactory.go index 09f80e44a..da0b9497b 100644 --- a/txfactory.go +++ b/txfactory.go @@ -44,7 +44,7 @@ const ( // DefaultTxsrc is set here. pilosa/server/config.go references it // to set the default for pilosa server exeutable. // Can be overridden with env variable PILOSA_TXSRC for testing. -const DefaultTxsrc = RoaringTxn +const DefaultTxsrc = RBFTxn // DetectMemAccessPastTx true helps us catch places in api and executor // where mmapped memory is being accessed after the point in time