Closed loleg closed 3 years ago
I've looked at this a bit more closely. I wonder if it's just an issue of the go test
FAIL causing an error condition? We do want to know that tests are failing, but not if it's only because of low test coverage. The thought led me to a good possible Go alternative to the Makefile
build: https://github.com/magefile/mage
Here is the last passing build: https://github.com/ProxeusApp/proxeus-core/commit/84526d45606a229eee1237df672331bc0eb406eb
We did not change anything except frontend versions in the subsequent one, so I have to assume for now that it is an upstream issue.
Since the last branch commit, the test-api-go build has gone green. I suppose this is linked to the environment configuration issues we remediated.
However, coverage-go is still failing as follows:
#!/bin/bash -eo pipefail
make init test test-integration test-api coverage=true
Checking go is installed...
/usr/local/go/bin/go
Checking curl is installed...
/usr/bin/curl
go install golang.org/x/tools/cmd/goimports
go install github.com/go-bindata/go-bindata/...
go install github.com/golang/mock/mockgen
go install github.com/wadey/gocovmerge
go install golang.org/x/tools/cmd/godoc
go-bindata -pkg assets -o ./main/handlers/assets/bindata.go -prefix ./ui/core/dist ./ui/core/dist/...
goimports -w main/handlers/assets/bindata.go
make: Circular test/assets/bindata.go <- test/assets/bindata.go dependency dropped.
go test -coverprofile artifacts/test.coverage -coverpkg=",github.com/ProxeusApp/proxeus-core/main,github.com/ProxeusApp/proxeus-core/main/app,github.com/ProxeusApp/proxeus-core/main/config,github.com/ProxeusApp/proxeus-core/main/handlers,github.com/ProxeusApp/proxeus-core/main/handlers/api,github.com/ProxeusApp/proxeus-core/main/handlers/blockchain,github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue,github.com/ProxeusApp/proxeus-core/main/handlers/customNode,github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder,github.com/ProxeusApp/proxeus-core/main/handlers/helpers,github.com/ProxeusApp/proxeus-core/main/handlers/i18n,github.com/ProxeusApp/proxeus-core/main/handlers/payment,github.com/ProxeusApp/proxeus-core/main/handlers/template_ide,github.com/ProxeusApp/proxeus-core/main/handlers/workflow,github.com/ProxeusApp/proxeus-core/main/priceservice,github.com/ProxeusApp/proxeus-core/main/www,github.com/ProxeusApp/proxeus-core/sys,github.com/ProxeusApp/proxeus-core/sys/eio,github.com/ProxeusApp/proxeus-core/sys/email,github.com/ProxeusApp/proxeus-core/sys/file,github.com/ProxeusApp/proxeus-core/sys/form,github.com/ProxeusApp/proxeus-core/sys/i18n,github.com/ProxeusApp/proxeus-core/sys/model,github.com/ProxeusApp/proxeus-core/sys/model/compatability,github.com/ProxeusApp/proxeus-core/sys/tar,github.com/ProxeusApp/proxeus-core/sys/validate,github.com/ProxeusApp/proxeus-core/sys/workflow,github.com/ProxeusApp/proxeus-core/storage,github.com/ProxeusApp/proxeus-core/storage/database,github.com/ProxeusApp/proxeus-core/storage/database/db,github.com/ProxeusApp/proxeus-core/storage/portable,github.com/ProxeusApp/proxeus-core/service" ./main/... ./sys/... ./storage/... ./service/...
warning: no packages being tested depend on matches for pattern
? github.com/ProxeusApp/proxeus-core/main [no test files]
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
FAIL github.com/ProxeusApp/proxeus-core/main/app [build failed]
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
# github.com/ProxeusApp/proxeus-core/main/handlers/template_ide.test
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
# github.com/ProxeusApp/proxeus-core/main/priceservice.test
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
ok github.com/ProxeusApp/proxeus-core/main/config 0.177s coverage: 0.7% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
? github.com/ProxeusApp/proxeus-core/main/handlers [no test files]
? github.com/ProxeusApp/proxeus-core/main/handlers/api [no test files]
? github.com/ProxeusApp/proxeus-core/main/handlers/assets [no test files]
FAIL github.com/ProxeusApp/proxeus-core/main/handlers/blockchain [build failed]
ok github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue 9.126s coverage: 1.0% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
? github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/mock [no test files]
FAIL github.com/ProxeusApp/proxeus-core/main/handlers/customNode [build failed]
? github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder [no test files]
? github.com/ProxeusApp/proxeus-core/main/handlers/helpers [no test files]
? github.com/ProxeusApp/proxeus-core/main/handlers/i18n [no test files]
FAIL github.com/ProxeusApp/proxeus-core/main/handlers/payment [build failed]
FAIL github.com/ProxeusApp/proxeus-core/main/handlers/template_ide [build failed]
? github.com/ProxeusApp/proxeus-core/main/handlers/workflow [no test files]
FAIL github.com/ProxeusApp/proxeus-core/main/priceservice [build failed]
FAIL github.com/ProxeusApp/proxeus-core/main/www [build failed]
? github.com/ProxeusApp/proxeus-core/sys [no test files]
ok github.com/ProxeusApp/proxeus-core/sys/eio 0.114s coverage: 0.3% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
? github.com/ProxeusApp/proxeus-core/sys/email [no test files]
FAIL github.com/ProxeusApp/proxeus-core/sys/file [build failed]
FAIL github.com/ProxeusApp/proxeus-core/sys/form [build failed]
FAIL github.com/ProxeusApp/proxeus-core/sys/i18n [build failed]
FAIL github.com/ProxeusApp/proxeus-core/sys/model [build failed]
? github.com/ProxeusApp/proxeus-core/sys/model/compatability [no test files]
FAIL github.com/ProxeusApp/proxeus-core/sys/tar [build failed]
ok github.com/ProxeusApp/proxeus-core/sys/validate 0.117s coverage: 3.9% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
FAIL github.com/ProxeusApp/proxeus-core/sys/workflow [build failed]
ok github.com/ProxeusApp/proxeus-core/storage 0.191s coverage: 0.4% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
ok github.com/ProxeusApp/proxeus-core/storage/database 0.233s coverage: 19.1% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
FAIL github.com/ProxeusApp/proxeus-core/storage/database/db [build failed]
? github.com/ProxeusApp/proxeus-core/storage/database/mock [no test files]
? github.com/ProxeusApp/proxeus-core/storage/mock [no test files]
? github.com/ProxeusApp/proxeus-core/storage/portable [no test files]
ok github.com/ProxeusApp/proxeus-core/service 0.041s coverage: 0.4% of statements in , github.com/ProxeusApp/proxeus-core/main, github.com/ProxeusApp/proxeus-core/main/app, github.com/ProxeusApp/proxeus-core/main/config, github.com/ProxeusApp/proxeus-core/main/handlers, github.com/ProxeusApp/proxeus-core/main/handlers/api, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain, github.com/ProxeusApp/proxeus-core/main/handlers/blockchain/ethglue, github.com/ProxeusApp/proxeus-core/main/handlers/customNode, github.com/ProxeusApp/proxeus-core/main/handlers/formbuilder, github.com/ProxeusApp/proxeus-core/main/handlers/helpers, github.com/ProxeusApp/proxeus-core/main/handlers/i18n, github.com/ProxeusApp/proxeus-core/main/handlers/payment, github.com/ProxeusApp/proxeus-core/main/handlers/template_ide, github.com/ProxeusApp/proxeus-core/main/handlers/workflow, github.com/ProxeusApp/proxeus-core/main/priceservice, github.com/ProxeusApp/proxeus-core/main/www, github.com/ProxeusApp/proxeus-core/sys, github.com/ProxeusApp/proxeus-core/sys/eio, github.com/ProxeusApp/proxeus-core/sys/email, github.com/ProxeusApp/proxeus-core/sys/file, github.com/ProxeusApp/proxeus-core/sys/form, github.com/ProxeusApp/proxeus-core/sys/i18n, github.com/ProxeusApp/proxeus-core/sys/model, github.com/ProxeusApp/proxeus-core/sys/model/compatability, github.com/ProxeusApp/proxeus-core/sys/tar, github.com/ProxeusApp/proxeus-core/sys/validate, github.com/ProxeusApp/proxeus-core/sys/workflow, github.com/ProxeusApp/proxeus-core/storage, github.com/ProxeusApp/proxeus-core/storage/database, github.com/ProxeusApp/proxeus-core/storage/database/db, github.com/ProxeusApp/proxeus-core/storage/portable, github.com/ProxeusApp/proxeus-core/service
FAIL
make: *** [Makefile:143: test] Error 2
Exited with code exit status 2
CircleCI received exit code 2
On further investigation, I am unable to reproduce the issue locally and suspect an out of date Go build. The current recommendation at CircleCI is to move to the next gen build images, as specified at https://circleci.com/developer/images/image/cimg/go
The back-and-forth was due to my mistaking a misinstalled package for a GOPATH issue.
In the current PR all tests are passing, except for a new issue with integration testing. Closing this in favour of #218
The last build that was completely green in CircleCI was 858. We should have a look to find out if something's changed in the configuration, dependencies or test environment that is currently causing the
test-api-go
andcoverage-go
suites to fail. From a quick look at the build logs I'm not sure what is going on: