Add an end-to-end test.

This test runs a selection of collectors against the fixtures and
compares the output to a reference.

The uname and filesystem collectors are disabled because they use system
calls that cannot be fixtured easily.
This commit is contained in:
Matthias Rampke 2015-09-26 20:54:49 +02:00 committed by Matthias Rampke
commit 7c47338081
5 changed files with 1381 additions and 1 deletions

View file

@ -226,6 +226,7 @@ func (c *mdadmCollector) Update(ch chan<- prometheus.Metric) (err error) {
_, err = os.Stat(statusfile)
if os.IsNotExist(err) {
// no such file or directory, nothing to do, just return
log.Debugf("Not collecting mdstat, file does not exist: %s", statusfile)
return nil
}