Title
#fleet
Bacarus

Bacarus

04/04/2022, 1:08 PM
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:
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.
Tomas Touceda

Tomas Touceda

04/04/2022, 5:04 PM
hi there! seems like you need to run
make generate-mock
Bacarus

Bacarus

04/05/2022, 12:01 PM
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
12:16 PM
I fixed it, the go/bin wasn’t in the path env variable
3:16 PM
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
Tomas Touceda

Tomas Touceda

04/05/2022, 3:18 PM
glad you figured it out! totally agreed on your suggestion