1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-11 05:55:57 +00:00

formatting

Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-08-17 10:06:20 +03:00
parent 00967408dc
commit 07046ab978
112 changed files with 477 additions and 517 deletions

View File

@@ -76,7 +76,6 @@ func (m myTestTask) OnServe(host TaskHost) {
time.AfterFunc(startDelay, func() {
m.logger.Println("restart")
host.Serve() // restart
})
}

View File

@@ -20,7 +20,6 @@ const (
)
func newTester(t *testing.T, baseURL string, handler http.Handler) *httpexpect.Expect {
var transporter http.RoundTripper
if strings.HasPrefix(baseURL, "http") { // means we are testing real serve time
@@ -57,9 +56,8 @@ func testSupervisor(t *testing.T, creator func(*http.Server, []func(TaskHost)) *
)
// http routing
var (
expectedBody = "this is the response body\n"
)
expectedBody := "this is the response body\n"
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@@ -98,6 +96,7 @@ func testSupervisor(t *testing.T, creator func(*http.Server, []func(TaskHost)) *
t.Fatalf("expected hello Task's message to be '%s' but got '%s'", expectedHelloMessage, got)
}
}
func TestSupervisor(t *testing.T) {
testSupervisor(t, func(srv *http.Server, tasks []func(TaskHost)) *Supervisor {
su := New(srv)