I would love to contribute to Beats, but I am having a hard time setting up the dev environment and validating the tests before starting any work. This would be my first Go project, apologies if something is not clear or there are basic mistakes.
I followed the steps described here and ended up with the repo cloned in
with my PATH and GOPATH being
Details about the versions of the tools I run:
Linux 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
go version go1.10 linux/amd64
pip 10.0.1 from /home/<user>/.local/lib/python2.7/site-packages/pip (python 2.7)
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
I can run the
make command fine inside the
elastic/beats/filebeat/ directory, but
make testsuite fails with:
... # gotestcover is needed to fetch coverage for multiple packages go get github.com/elastic/beats/vendor/github.com/pierrre/gotestcover # testify is needed for unit and integration tests go get github.com/elastic/beats/vendor/github.com/stretchr/testify/assert # libcompose is needed for integration tests go get github.com/docker/libcompose ... ok github.com/elastic/beats/filebeat/harvester/encoding 0.005s coverage: 63.6% of statements command [go test -cover -coverprofile /tmp/gotestcover-062121212 github.com/elastic/beats/filebeat/config]: exit status 1 --- FAIL: TestMergeConfigFiles (0.00s) Error Trace: config_test.go:97 Error: Not equal: expected: 4 actual : 0 Test: TestMergeConfigFiles FAIL ... test failed ../libbeat/scripts/Makefile:169: recipe for target 'unit-tests' failed make: *** [unit-tests] Error 1 make: Leaving directory '/home/<user>/git/go/src/github.com/elastic/beats/filebeat' ../libbeat/scripts/Makefile:255: recipe for target 'testsuite' failed make: *** [testsuite] Error 2
make test in the same folder or
make in the main directory also fail. Can provide all the full traces if needed. What does work though is running
go test - but perhaps that's not the proper way to test the project.
I also tried running the
go get github.com/... commands that appeared on the logs, maybe hinting something, but nothing did change even after that.
I've been banging my head for the last hours around this. Am I even running this right?
If anyone can help me out or point me in the right direction that would be awesome