diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-13 01:20:52 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-13 01:20:52 -0400 |
commit | 7d0b836693619d1fbe1da3b817e3820da6666699 (patch) | |
tree | ff9472593ff27974ece995d09815a042df62d237 | |
parent | 126c00e4329f3e1f0efa210318f022f4248c53e2 (diff) | |
download | getwtxt-7d0b836693619d1fbe1da3b817e3820da6666699.tar.gz |
adjusting test config init func
-rw-r--r-- | handlers_test.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/handlers_test.go b/handlers_test.go index 4a607e2..088af24 100644 --- a/handlers_test.go +++ b/handlers_test.go @@ -13,6 +13,7 @@ var testport = fmt.Sprintf(":%v", confObj.port) func initTestConf() { initConfig() + logToNull() } func logToNull() { @@ -25,7 +26,6 @@ func logToNull() { func Test_indexHandler(t *testing.T) { initTestConf() - logToNull() t.Run("indexHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/", nil) @@ -38,7 +38,6 @@ func Test_indexHandler(t *testing.T) { } func Test_apiBaseHandler(t *testing.T) { initTestConf() - logToNull() t.Run("apiBaseHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api", nil) @@ -51,7 +50,6 @@ func Test_apiBaseHandler(t *testing.T) { } func Test_apiFormatHandler(t *testing.T) { initTestConf() - logToNull() t.Run("apiFormatHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain", nil) @@ -64,7 +62,6 @@ func Test_apiFormatHandler(t *testing.T) { } func Test_apiEndpointHandler(t *testing.T) { initTestConf() - logToNull() t.Run("apiEndpointHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/users", nil) @@ -77,7 +74,6 @@ func Test_apiEndpointHandler(t *testing.T) { } func Test_apiTagsBaseHandler(t *testing.T) { initTestConf() - logToNull() t.Run("apiTagsBaseHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/tags", nil) @@ -90,7 +86,6 @@ func Test_apiTagsBaseHandler(t *testing.T) { } func Test_apiTagsHandler(t *testing.T) { initTestConf() - logToNull() t.Run("indexHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/tags/tag", nil) |