telenornms / skogul

Generic go-based data/metric-collector-framework for Gondul and more
GNU Lesser General Public License v2.1
28 stars 14 forks source link

Integration tests with external services #10

Open KristianLyng opened 5 years ago

KristianLyng commented 5 years ago

As nice as 'go test' is, we need integration testing as well. E.g.: Build, set up influx, do some tests, verify data in influx, pull things down.

I've seen some examples, but I feel like the "go"-based examples I've seen are bit too introvert. It doesn't make sense to me to use go to run 'docker run --name influx -d influxdb; sleep 5; run-tests; docker kill....'.... but there must be some better examples/practices out there.

KristianLyng commented 5 years ago

I've started doing some "integration" tests as part of the mysql sender. I'm thinking a simple start is to add an option/flag that enables/disables these tests is a good start, with a human text explaining what needs to be done to make them run...