Skip to content

Commit

Permalink
defer clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj committed Sep 7, 2023
1 parent 9f81dc8 commit 6744b39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/outputs/sql/sqlite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package sql

import (
gosql "database/sql"
"os"
"path/filepath"
"testing"
"time"
Expand All @@ -15,6 +16,8 @@ import (

func TestSqlite(t *testing.T) {
outDir := t.TempDir()
// Here for Windows complaining about process using the directory
defer t.Cleanup(func() { os.RemoveAll(outDir) })

dbfile := filepath.Join(outDir, "db")

Expand Down

0 comments on commit 6744b39

Please sign in to comment.