Closed obourdon closed 8 years ago
Can someone retrigger Travis CI please. No clue why the tests fail
@obourdon I took a look at this error and it seems that problem is in function TestCollectMetrics
You are preparing mTypes
for CollectMetrics
, but you forgot to set config for each metric. CollectCetrics
"reads" configuration from metrics to get the path, so you need to set up config per each metric.
@marcin-krolik thanks a lot for digging into this, however what I do not understand is why the tests are running perfectly fine on my environment. As a general rule, I always try to run tests prior to submit the final PR
Nevertheless, I will fix this ASAP. Another point you might want to shed light onto is the fact that I already did the same kind of modifications in other plugins without ever running into this kind of issue so the question: is the code of the interface plugin different from other plugins in this respect (disk, df, cpu, ...) Thanks again for everything
I just reran the tests on yet another system (MacOSX after tweaking the source code a little bit of course because this plugin is not supposed to be buildable on Macs) and tests ran ok again.
@obourdon I've just fetched your branch dynamic_metrics
, and reran tests in iface
directory with go test
. As expected I got the same error. How do you run tests on your environment?
I use
TEST_SUITE=unit make check
If I use your method:
MBP-Olivier-2:snap-plugin-collector-interface olivierbourdon$ cd iface/
MBP-Olivier-2:iface olivierbourdon$ go test
.....
5 total assertions
..................
23 total assertions
................
39 total assertions
PASS
ok github.com/intelsdi-x/snap-plugin-collector-interface/iface 0.027s
@marcin-krolik seems to be good now
LGTM
Depends on #11
All tests passed successfully