Closed tomkirkhawkeye closed 5 years ago
Thanks for PR. I made changes https://github.com/eBay/nvidiagpubeat/pull/19 in my local copy with ES 7.2 and the unit tests cases ran fine in macOS
without the changes in this PR.
$ make unit-tests
mkdir -p /Users/dvasthimal/Documents/ebay/opensource/beats_dev/src/github.com/ebay/nvidiagpubeat/build/coverage
# 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
go test -i ./beater/... ./config/... ./nvidia/... .
/Users/dvasthimal/Documents/ebay/opensource/beats_dev/bin/gotestcover -coverprofile=/Users/dvasthimal/Documents/ebay/opensource/beats_dev/src/github.com/ebay/nvidiagpubeat/build/coverage/unit.cov ./beater/... ./config/... ./nvidia/... .
ok github.com/ebay/nvidiagpubeat/config 0.932s coverage: 0.0% of statements
ok github.com/ebay/nvidiagpubeat/beater 2.039s coverage: 16.0% of statements
ok github.com/ebay/nvidiagpubeat/nvidia 1.159s coverage: 91.4% of statements
ok github.com/ebay/nvidiagpubeat 1.129s coverage: 0.0% of statements
$
What environment you see the error in ?
Really felt like this wasn't working when I tested but cannot reproduce now! For reference, all my testing is running Ubuntu in WSL to cross compile for Windows. I'll close this PR
Calling make unit-tests failed for me, first when trying to parse requirements.txt (due to not handling <!--) and secondly for not having a magefile.
The magefile is taken from one of the basic elasticbeats