eBay / nvidiagpubeat

nvidiagpubeat is an elastic beat that uses NVIDIA System Management Interface (nvidia-smi) to monitor NVIDIA GPU devices and can ingest metrics into Elastic search cluster, with support for both 6.x and 7.x versions of beats. nvidia-smi is a command line utility, based on top of the NVIDIA Management Library (NVML), intended to aid in the management and monitoring of NVIDIA GPU devices.
https://github.com/eBay/nvidiagpubeat
Apache License 2.0
54 stars 22 forks source link

Fix make unit-tests #20

Closed tomkirkhawkeye closed 5 years ago

tomkirkhawkeye commented 5 years ago

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

deepujain commented 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 ?

tomkirkhawkeye commented 5 years ago

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