From 827d3052c9d040ecb5c8f6399253f586113740b2 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Wed, 7 Feb 2024 18:45:45 -0800 Subject: [PATCH] fixed "missing test.db" error --- tests/testdb.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/testdb.go b/tests/testdb.go index 922ac13..b6797cb 100644 --- a/tests/testdb.go +++ b/tests/testdb.go @@ -18,10 +18,11 @@ func SetLogLevel(level zerolog.Level) { func Init_testdb(DB_TYPE string, DB_CONNECTION_STRING string) { - cwd, err := os.Getwd() + cwd, err := os.Getwd(); if err != nil { log.Fatal().Err(err).Msg("Could not get current working directory") } else { + cwd = cwd + "/"; log.Trace().Msgf("Currect working directory is: %s", cwd) } @@ -30,7 +31,7 @@ func Init_testdb(DB_TYPE string, DB_CONNECTION_STRING string) { log.Debug().Msg("Found existing test.db file. Attempting to delete") err = os.Remove(DB_CONNECTION_STRING) if err != nil { - log.Fatal().Err(err).Msg("Failed to delete testing db") + log.Warn().Err(err).Msg("Failed to delete testing db. Continueing anyways") } else { log.Debug().Msg("Deleted test.db file successfully") }