summary refs log tree commit diff stats
path: root/init_test.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-27 19:01:04 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-27 19:01:04 -0400
commitd6d0c18cad6426a0562d19b2b0c66a7c2bb4e2c5 (patch)
tree0157890c7bf462db415ad0ed59828576496b2685 /init_test.go
parent6f9383517d8dbee557d2b52113e20e08207b533e (diff)
downloadgetwtxt-d6d0c18cad6426a0562d19b2b0c66a7c2bb4e2c5.tar.gz
fixed race condition
Diffstat (limited to 'init_test.go')
-rw-r--r--init_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/init_test.go b/init_test.go
index 0739d47..bffe036 100644
--- a/init_test.go
+++ b/init_test.go
@@ -7,11 +7,15 @@ import (
 )
 
 var testport = fmt.Sprintf(":%v", confObj.Port)
+var hasInit = false
 
 func initTestConf() {
-	initConfig()
-	tmpls = initTemplates()
-	logToNull()
+	if !hasInit {
+		initConfig()
+		tmpls = initTemplates()
+		logToNull()
+		hasInit = true
+	}
 }
 
 func logToNull() {