add server_data_loader_test.go

This commit is contained in:
Dawid Wysokiński 2021-07-13 16:40:29 +02:00
parent 1248c0d7db
commit 4613155d5d
2 changed files with 33 additions and 0 deletions

View File

@ -47,6 +47,20 @@ func prepareTestServer(h *handlers) *httptest.Server {
case EndpointGetServers:
h.getServers(w, r)
return
case EndpointKillAll:
return
case EndpointKillAtt:
return
case EndpointKillDef:
return
case EndpointKillSup:
return
case EndpointKillAllTribe:
return
case EndpointKillAttTribe:
return
case EndpointKillDefTribe:
return
default:
w.WriteHeader(http.StatusNotFound)
}

View File

@ -0,0 +1,19 @@
package twdataloader
import (
"testing"
)
func TestLoadOD(t *testing.T) {
t.Run("fallback to the not gzipped endpoint", func(t *testing.T) {
})
t.Run("invalid line format", func(t *testing.T) {
})
t.Run("success", func(t *testing.T) {
})
}