From ae9668b8053511eb274c33aaecb9a97fbd0827dc Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 14 Sep 2023 12:09:06 -0600 Subject: [PATCH] test(outputs.sql): Fix clean up of sql database file (#13918) --- plugins/outputs/sql/sqlite_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/outputs/sql/sqlite_test.go b/plugins/outputs/sql/sqlite_test.go index 2b619667d..ec227fbec 100644 --- a/plugins/outputs/sql/sqlite_test.go +++ b/plugins/outputs/sql/sqlite_test.go @@ -15,10 +15,8 @@ import ( ) func TestSqlite(t *testing.T) { - outDir := os.TempDir() - defer os.Remove(outDir) - - dbfile := filepath.Join(outDir, "db") + dbfile := filepath.Join(os.TempDir(), "db") + defer os.Remove(dbfile) // Use the plugin to write to the database address := // fmt.Sprintf("file:%v", dbfile)