make tests pass with "go test -count n" with n > 1

by closing initialized resources during tests.
This commit is contained in:
Mechiel Lukkien
2024-06-10 18:18:20 +02:00
parent dde2258f69
commit f56b04805b
9 changed files with 50 additions and 40 deletions

View File

@ -46,6 +46,7 @@ func TestSendReports(t *testing.T) {
err := tlsrptdb.Init()
tcheckf(t, err, "init database")
defer tlsrptdb.Close()
db := tlsrptdb.ResultDB