Skip to content

Commit

Permalink
Test tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelycode committed Oct 7, 2015
1 parent 9aff352 commit aacac38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ language: go
sudo: false

go:
- 1.3
- 1.5


services:
- redis-server
- mongodb
- nginx

install:
- go get -d -v ./... && go build -v ./...
Expand Down
20 changes: 10 additions & 10 deletions gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func getChain(spec APISpec) http.Handler {
orgStore := &RedisClusterStorageManager{KeyPrefix: "orgKey."}
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
remote, _ := url.Parse(spec.Proxy.TargetURL)
//remote, _ := url.Parse("http://lonelycode.com/")
//remote, _ := url.Parse("http://localhost/")
proxy := TykNewSingleHostReverseProxy(remote, &spec)
proxyHandler := http.HandlerFunc(ProxyHandler(proxy, &spec))
tykMiddleware := &TykMiddleware{&spec, proxy}
Expand Down Expand Up @@ -192,7 +192,7 @@ var nonExpiringDefNoWhiteList string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com/",
"target_url": "http://localhost/",
"strip_listen_path": false
}
}
Expand Down Expand Up @@ -250,7 +250,7 @@ var VersionedDefinition string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com/",
"target_url": "http://localhost/",
"strip_listen_path": false
}
}
Expand Down Expand Up @@ -431,7 +431,7 @@ var ExtendedPathGatewaySetup string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com/",
"target_url": "http://localhost/",
"strip_listen_path": false
}
}
Expand Down Expand Up @@ -533,7 +533,7 @@ func TestThrottling(t *testing.T) {
thisSession := createThrottledSession()
keyId := randSeq(10)
spec.SessionManager.UpdateSession(keyId, thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down Expand Up @@ -602,7 +602,7 @@ func TestVersioningRequestOK(t *testing.T) {
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
thisSession := createVersionedSession()
spec.SessionManager.UpdateSession("1234", thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down Expand Up @@ -634,7 +634,7 @@ func TestVersioningRequestFail(t *testing.T) {

// no version allowed
spec.SessionManager.UpdateSession("zz1234", thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down Expand Up @@ -727,7 +727,7 @@ func TestQuota(t *testing.T) {
thisSession := createQuotaSession()
keyId := randSeq(10)
spec.SessionManager.UpdateSession(keyId, thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down Expand Up @@ -789,7 +789,7 @@ func TestWithAnalytics(t *testing.T) {
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
thisSession := createNonThrottledSession()
spec.SessionManager.UpdateSession("1234", thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down Expand Up @@ -842,7 +842,7 @@ func TestWithAnalyticsErrorResponse(t *testing.T) {
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
thisSession := createNonThrottledSession()
spec.SessionManager.UpdateSession("1234", thisSession, 60)
uri := "/about-lonelycoder/"
uri := "/"
method := "GET"

recorder := httptest.NewRecorder()
Expand Down

0 comments on commit aacac38

Please sign in to comment.