add server_data_loader_test.go
This commit is contained in:
parent
1248c0d7db
commit
4613155d5d
|
@ -47,6 +47,20 @@ func prepareTestServer(h *handlers) *httptest.Server {
|
||||||
case EndpointGetServers:
|
case EndpointGetServers:
|
||||||
h.getServers(w, r)
|
h.getServers(w, r)
|
||||||
return
|
return
|
||||||
|
case EndpointKillAll:
|
||||||
|
return
|
||||||
|
case EndpointKillAtt:
|
||||||
|
return
|
||||||
|
case EndpointKillDef:
|
||||||
|
return
|
||||||
|
case EndpointKillSup:
|
||||||
|
return
|
||||||
|
case EndpointKillAllTribe:
|
||||||
|
return
|
||||||
|
case EndpointKillAttTribe:
|
||||||
|
return
|
||||||
|
case EndpointKillDefTribe:
|
||||||
|
return
|
||||||
default:
|
default:
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
Reference in New Issue