Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
192 stars 39 forks source link

Scripts (stuff in bin/) are not tested #1867

Open hmpf opened 5 years ago

hmpf commented 5 years ago

Scripts in bin/ doesn't seem to be tested, at least they don't turn up in the coverage report.

There is an integration test that checks if they can run without error, but this doesn't test that the output is correct, when there is output.

hmpf commented 5 years ago

For example, /bin/navdump spits out different results on python2 and python3 for the same input.

hmpf commented 5 years ago

whisper_update_many doesn't even have if __name__ == "__main__":.

lunkwill42 commented 5 years ago

whisper_update_many doesn't even have if __name__ == "__main__":.

I believe this script is obsolete by now, anyway. It was part of the tools provided to migrate older NAV installations from Cricket/RRD data to Graphite/Whisper data. Might as well remove it.

lunkwill42 commented 5 years ago

And so I did, in 6af388f1

lunkwill42 commented 2 years ago

There is now an extra test for naventity, implemented as part of #2444 - but it doesn't verify the output - it is just a custom regression test for a crash bug.