Hi Team,
I'm trying to perform testing for filebeat, but getting below problem with libcompose.
package github.com/docker/libcompose: cannot download, $GOPATH must not be set to $GOROOT. For more details see: 'go help gopath
go version
go version go1.12.5 linux/amd64
virtualenv --version
16.5.0
Command:
make testsuite
Full logs:
make[1]: Entering directory `/usr/local/go/src/github.com/elastic/beats/libbeat' /root/.magefile cleaned No LICENSE.txt / LICENSE found in source New python executable in /usr/local/go/src/github.com/elastic/beats/libbeat/build/python-env/bin/python2 Also creating executable in /usr/local/go/src/github.com/elastic/beats/libbeat/build/python-env/bin/python Installing setuptools, pip, wheel... done. DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. make[2]: Entering directory `/usr/local/go/src/github.com/elastic/beats/libbeat' mage -v fields warning: GOPATH set to GOROOT (/usr/local/go) has no effect Running target: Fields Found Elastic Beats dir at /usr/local/go/src/github.com/elastic/beats exec: go run /usr/local/go/src/github.com/elastic/beats/libbeat/scripts/cmd/global_fields/main.go -es_beats_path /usr/local/go/src/github.com/elastic/beats -beat_path /usr/local/go/src/github.com/elastic/beats/libbeat processors warning: GOPATH set to GOROOT (/usr/local/go) has no effect Generated fields.yml for libbeat make[2]: Leaving directory `/usr/local/go/src/github.com/elastic/beats/libbeat' Updating generated files for libbeat cat: _meta/beat.yml: No such file or directory cat: _meta/beat.yml: No such file or directory if [ -d /usr/local/go/src/github.com/elastic/beats/libbeat/_meta/kibana ]; then \ cp -pr /usr/local/go/src/github.com/elastic/beats/libbeat/_meta/kibana/* /usr/local/go/src/github.com/elastic/beats/libbeat/_meta/kibana.generated ; \ fi warning: GOPATH set to GOROOT (/usr/local/go) has no effect -- The index pattern was created under /usr/local/go/src/github.com/elastic/beats/libbeat/_meta/kibana.generated/5/index-pattern/libbeat.json -- The index pattern was created under /usr/local/go/src/github.com/elastic/beats/libbeat/_meta/kibana.generated/6/index-pattern/libbeat.json make unit-tests make[2]: Entering directory `/usr/local/go/src/github.com/elastic/beats/libbeat' mkdir -p /usr/local/go/src/github.com/elastic/beats/libbeat/build/coverage # gotestcover is needed to fetch coverage for multiple packages go get github.com/elastic/beats/vendor/github.com/pierrre/gotestcover warning: GOPATH set to GOROOT (/usr/local/go) has no effect # testify is needed for unit and integration tests go get github.com/elastic/beats/vendor/github.com/stretchr/testify/assert warning: GOPATH set to GOROOT (/usr/local/go) has no effect # libcompose is needed for integration tests go get github.com/docker/libcompose warning: GOPATH set to GOROOT (/usr/local/go) has no effect package github.com/docker/libcompose: cannot download, $GOPATH must not be set to $GOROOT. For more details see: 'go help gopath' make[2]: *** [prepare-tests] Error 1 make[2]: Leaving directory `/usr/local/go/src/github.com/elastic/beats/libbeat' make[1]: *** [testsuite] Error 2 make[1]: Leaving directory `/usr/local/go/src/github.com/elastic/beats/libbeat' make: *** [testsuite] Error 1
Please help me to get out of this.
Thanks in advance!
Best Regards,
Harsh Bajaj