Fleet tests don’t work in ubuntu. My steps: git cl...
# fleet
b
Fleet tests don’t work in ubuntu. My steps: git clone https://github.com/fleetdm/fleet cd fleet make deps make generate make docker-compose up -d make test-go I get this error:
Copy code
go run ./tools/dbutils ./server/datastore/mysql/schema.sql
dumping schema to ./server/datastore/mysql/schema.sql
mkdir -p build/linux
mkdir -p build/darwin
go install <http://github.com/groob/mockimpl@latest|github.com/groob/mockimpl@latest>
go: finding module for package <http://golang.org/x/tools/imports|golang.org/x/tools/imports>
go: found <http://golang.org/x/tools/imports|golang.org/x/tools/imports> in <http://golang.org/x/tools|golang.org/x/tools> v0.1.10
go generate <http://github.com/fleetdm/fleet/v4/server/mock|github.com/fleetdm/fleet/v4/server/mock>
server/mock/datastore.go:9: running "mockimpl": exec: "mockimpl": executable file not found in $PATH
make: *** [Makefile:169: generate-mock] Error 1
go version 1.18 linux/amd64 npm -v 6.14.15 node -v 14.18.3 Note: on mac os (same steps) and the tests work without errors.
t
hi there! seems like you need to run
make generate-mock
b
I think make generate-mock is executed in make test-go: makefile row 132: `make test-go: dump-test-schema generate-mock`` Anyways, even if I launch make generate-mock directly, the same error occours
I fixed it, the go/bin wasn’t in the path env variable
maybe you should add an hint in the documentation to check if the GOPATH is included in your PATH env variable. Also
apt-get install go
that is suggested in the docs (build fleet) installs an old version of go (1.13 if i remember correctly). Reading from your repository golang v1.17.7 is needed to run fleet correctly so a clean installation is required
t
glad you figured it out! totally agreed on your suggestion
😉 1