Skip to content

Commit

Permalink
Added tests for hello healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Jan 12, 2018
1 parent 83e5ac4 commit 3d76757
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,28 @@ func TestCustomDomain(t *testing.T) {
})
}

func TestHelloHealthcheck(t *testing.T) {
ts := newTykTestServer()
defer ts.Close()

t.Run("Without APIs", func(t *testing.T) {
ts.Run(t, []test.TestCase{
{Method: "GET", Path: "/hello", Code: 200},
}...)
})

t.Run("Without APIs", func(t *testing.T) {
buildAndLoadAPI(func(spec *APISpec) {
spec.Proxy.ListenPath = "/sample"
})

ts.Run(t, []test.TestCase{
{Method: "GET", Path: "/hello", Code: 200},
{Method: "GET", Path: "/sample/hello", Code: 200},
}...)
})
}

func TestWithCacheAllSafeRequests(t *testing.T) {
ts := newTykTestServer(tykTestServerConfig{
delay: 10 * time.Millisecond,
Expand Down

0 comments on commit 3d76757

Please sign in to comment.