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:
parent
6afd0122c9
commit
9668106959
1 changed files with 9 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue