Channels
  • b

    Bacarus

    2 months ago
    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
  • Tomas Touceda

    Tomas Touceda

    2 months ago
    hi there! seems like you need to run
    make generate-mock
  • b

    Bacarus

    2 months ago
    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<-hr>I fixed it, the go/bin wasn’t in the path env variable<-hr>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

    2 months ago
    glad you figured it out! totally agreed on your suggestion