Fix state unit tests

Logging needs to be initialized in order for the state unit tests
to function without issue.

See previous commit ("Fix config unit tests") for more information.

Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
Ava Apples Affine 2024-11-14 10:30:04 -08:00
parent 6afd0122c9
commit 9668106959

View file

@ -4,6 +4,8 @@ import (
"fmt"
"testing"
"time"
"gitlab.com/whom/bingobot/internal/logging"
)
/* WARNING:
@ -12,8 +14,15 @@ import (
*/
const TestTok = "TEST_NAME"
var loggingInitialized = false
func SetupTest(t *testing.T) {
// have to set up logger
if !loggingInitialized {
logging.Init()
loggingInitialized = true
}
old, _ := time.Parse(
time.RFC3339,
VeryOldVote,