HewlettPackard / lustre_exporter

Prometheus exporter for use with the Lustre parallel filesystem
Apache License 2.0
34 stars 51 forks source link

Test interface FS #93

Closed mjtrangoni closed 7 years ago

mjtrangoni commented 7 years ago

I just wanted to point this example out, and I think It would be worth to implement for testing. procfs has a testing interface FS.

FS represents the pseudo-filesystem proc, which provides an interface to
// kernel data structures.

You can define if you what the kernel data structure file, or just local file for testing purpose. They use a directory called 'fixture' for those files.

The main advantage here, is that you do not have to embedded it all in code, and you can also define many cases of them for more testing possibilities. If you want to develop or fix anything at home, without a Lustre file-system you can do it too.

My 2 cents.

mjtrangoni commented 7 years ago

I found this at weekend and I think it could be a good usecase here.

roclark commented 7 years ago

I created #102 which runs every metric through the entire code-chain. I had some inspiration from the node_exporter with my design but took it a step further to verify the code is actually being executed and compared on each test-run as opposed to just comparing results with a text file. Feel free to take a look and let me know if you feel this new method is sufficient.

roclark commented 7 years ago

@mjtrangoni is the merging of #102 sufficient to close this out?

mjtrangoni commented 7 years ago

@roclark I agree you can close this issue. Nice work! I will be taking a close look at weekend.