Skip to content

Commit

Permalink
Purging old URL entries from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelycode committed Sep 29, 2016
1 parent 06b92a1 commit a445984
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions api_definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var sampleDefiniton string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
}
}
Expand Down Expand Up @@ -75,7 +75,7 @@ var nonExpiringDef string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ var nonExpiringMultiDef string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
}
}
Expand Down
2 changes: 1 addition & 1 deletion middleware_basic_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func getBasicAuthChain(spec APISpec) http.Handler {
healthStore := &RedisStorageManager{KeyPrefix: "apihealth."}
orgStore := &RedisStorageManager{KeyPrefix: "orgKey."}
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
remote, _ := url.Parse("http://lonelycode.com/")
remote, _ := url.Parse("http://example.com/")
proxy := TykNewSingleHostReverseProxy(remote, &spec)
proxyHandler := http.HandlerFunc(ProxyHandler(proxy, &spec))
tykMiddleware := &TykMiddleware{&spec, proxy}
Expand Down
8 changes: 4 additions & 4 deletions middleware_ip_whitelist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var ipMiddlewareTestDefinitionEnabledFail string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
},
"enable_ip_whitelisting": true,
Expand Down Expand Up @@ -76,7 +76,7 @@ var ipMiddlewareTestDefinitionEnabledPass string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
},
"enable_ip_whitelisting": true,
Expand Down Expand Up @@ -114,7 +114,7 @@ var ipMiddlewareTestDefinitionDisabled string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
},
"enable_ip_whitelisting": false,
Expand Down Expand Up @@ -152,7 +152,7 @@ var ipMiddlewareTestDefinitionMissing string = `
},
"proxy": {
"listen_path": "/v1",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
}
}
Expand Down
2 changes: 1 addition & 1 deletion middleware_jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func getJWTChain(spec APISpec) http.Handler {
healthStore := &RedisStorageManager{KeyPrefix: "apihealth."}
orgStore := &RedisStorageManager{KeyPrefix: "orgKey."}
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
remote, _ := url.Parse("http://lonelycode.com/")
remote, _ := url.Parse("http://example.com/")
proxy := TykNewSingleHostReverseProxy(remote, &spec)
proxyHandler := http.HandlerFunc(ProxyHandler(proxy, &spec))
tykMiddleware := &TykMiddleware{&spec, proxy}
Expand Down
2 changes: 1 addition & 1 deletion multiauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func getMultiAuthStandardAndBasicAuthChain(spec APISpec) http.Handler {
healthStore := &RedisStorageManager{KeyPrefix: "apihealth."}
orgStore := &RedisStorageManager{KeyPrefix: "orgKey."}
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
remote, _ := url.Parse("http://lonelycode.com/")
remote, _ := url.Parse("http://example.com/")
proxy := TykNewSingleHostReverseProxy(remote, &spec)
proxyHandler := http.HandlerFunc(ProxyHandler(proxy, &spec))
tykMiddleware := &TykMiddleware{&spec, proxy}
Expand Down
4 changes: 2 additions & 2 deletions oauth_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var oauthDefinition string = `
},
"proxy": {
"listen_path": "/APIID/",
"target_url": "http://lonelycode.com",
"target_url": "http://example.com",
"strip_listen_path": false
}
}
Expand All @@ -89,7 +89,7 @@ func getOAuthChain(spec APISpec, Muxer *mux.Router) {
orgStore := &RedisStorageManager{KeyPrefix: "orgKey."}
spec.Init(&redisStore, &redisStore, healthStore, orgStore)
addOAuthHandlers(&spec, Muxer, true)
remote, _ := url.Parse("http://lonelycode.com/")
remote, _ := url.Parse("http://example.com/")
proxy := TykNewSingleHostReverseProxy(remote, &spec)
proxyHandler := http.HandlerFunc(ProxyHandler(proxy, &spec))
tykMiddleware := &TykMiddleware{&spec, proxy}
Expand Down

0 comments on commit a445984

Please sign in to comment.