summary refs log tree commit diff stats
path: root/svc/init_test.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-09 04:21:03 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-09 04:21:03 -0400
commitc0507308950bf7db65d1f6ee79ce9f67b61cbe0e (patch)
tree09184268fa8872fe403398142fbce2b78cab9907 /svc/init_test.go
parent7410b8cd74d0f702b087577b1793bcf541ac8371 (diff)
downloadgetwtxt-c0507308950bf7db65d1f6ee79ce9f67b61cbe0e.tar.gz
explicit init of static assets and test template init were removed: redundant
Diffstat (limited to 'svc/init_test.go')
-rw-r--r--svc/init_test.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/svc/init_test.go b/svc/init_test.go
index 8fd8e95..a9fe624 100644
--- a/svc/init_test.go
+++ b/svc/init_test.go
@@ -2,7 +2,6 @@ package svc // import "github.com/getwtxt/getwtxt/svc"
 
 import (
 	"fmt"
-	"html/template"
 	"log"
 	"os"
 	"strings"
@@ -20,16 +19,15 @@ var (
 
 func initTestConf() {
 	initTestOnce.Do(func() {
+		logToNull()
 
 		testConfig()
-		tmpls = testTemplates()
-		staticCache = initAssets()
+		tmpls = initTemplates()
+		pingAssets()
 
 		confObj.Mu.RLock()
 		defer confObj.Mu.RUnlock()
 		testport = fmt.Sprintf(":%v", confObj.Port)
-
-		logToNull()
 	})
 }
 
@@ -47,10 +45,6 @@ func logToNull() {
 	log.SetOutput(hush)
 }
 
-func testTemplates() *template.Template {
-	return template.Must(template.ParseFiles("../assets/tmpl/index.html"))
-}
-
 func testConfig() {
 
 	viper.SetConfigName("getwtxt")