diff --git a/analytics.go b/analytics.go index 49aae21ca58..d25b79fb7e2 100644 --- a/analytics.go +++ b/analytics.go @@ -76,6 +76,9 @@ type RedisAnalyticsHandler struct { // RecordHit will store an AnalyticsRecord in Redis func (r RedisAnalyticsHandler) RecordHit(thisRecord AnalyticsRecord) error { + // If we are obfuscating API Keys, store the hashed representation (config check handled in hashing function) + thisRecord.APIKey = getHash(thisRecord.APIKey) + encoded, err := msgpack.Marshal(thisRecord) u5, _ := uuid.NewV4() diff --git a/config.go b/config.go index 9762d062ead..82c7ffd7e14 100644 --- a/config.go +++ b/config.go @@ -47,6 +47,7 @@ type Config struct { } `json:"health_check"` UseAsyncSessionWrite bool `json:"optimisations_use_async_session_write"` AllowMasterKeys bool `json:"allow_master_keys"` + HashKeys bool `json:"hash_keys"` } // WriteDefaultConf will create a default configuration file and set the storage type to "memory" diff --git a/session_manager.go b/session_manager.go index 21aacdf111c..1bb97682ca2 100644 --- a/session_manager.go +++ b/session_manager.go @@ -66,7 +66,7 @@ type SessionLimiter struct{} // Key values to manage rate are Rate and Per, e.g. Rate of 10 messages Per 10 seconds func (l SessionLimiter) ForwardMessage(currentSession *SessionState, key string, store StorageHandler) (bool, int) { - rateLimiterKey := RateLimitKeyPrefix + key + rateLimiterKey := RateLimitKeyPrefix + getHash(key) ratePerPeriodNow := store.IncrememntWithExpire(rateLimiterKey, int64(currentSession.Per)) if ratePerPeriodNow > (int64(currentSession.Rate)) { @@ -120,7 +120,7 @@ func (l SessionLimiter) IsRedisQuotaExceeded(currentSession *SessionState, key s } // Create the key - rawKey := QuotaKeyPrefix + key + rawKey := QuotaKeyPrefix + getHash(key) // INCR the key (If it equals 1 - set EXPIRE) qInt := store.IncrememntWithExpire(rawKey, currentSession.QuotaRenewalRate) diff --git a/storage_handlers.go b/storage_handlers.go index b1c42f850f2..95a3110f836 100644 --- a/storage_handlers.go +++ b/storage_handlers.go @@ -165,6 +165,10 @@ func (r *RedisStorageManager) Connect() bool { } func getHash(in string) string { + // if !config.HashKeys { + // Not hashing? Return the raw key + // return in + // } var h128 murmur3.Hash128 = murmur3.New128() h128.Write([]byte(in)) return hex.EncodeToString(h128.Sum(nil)) diff --git a/test_results.txt b/test_results.txt new file mode 100644 index 00000000000..e360f2b94ae --- /dev/null +++ b/test_results.txt @@ -0,0 +1,894 @@ +Usage: + tyk [options] +time="2015-03-20T06:06:08-04:00" level=warning msg="Error while parsing arguments: " +time="2015-03-20T06:06:08-04:00" level=info msg="No configuration file defined, will try to use default (./tyk.conf)" +time="2015-03-20T06:06:08-04:00" level=error msg="Couldn't load configuration file" +time="2015-03-20T06:06:08-04:00" level=error msg="open /etc/tyk/tyk.conf: no such file or directory" +time="2015-03-20T06:06:08-04:00" level=info msg="Writing a default file to ./tyk.conf" +time="2015-03-20T06:06:08-04:00" level=info msg="Loading default configuration..." +time="2015-03-20T06:06:08-04:00" level=warning msg="Setting up Empty API path" +=== RUN TestExpiredRequest +time="2015-03-20T06:06:08-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestExpiredRequest (0.02s) +=== RUN TestNotVersioned +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestNotVersioned (0.02s) +=== RUN TestMissingVersion +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestMissingVersion (0.02s) +=== RUN TestWrongVersion +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestWrongVersion (0.02s) +=== RUN TestBlacklistLinks +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestBlacklistLinks (0.02s) +=== RUN TestWhiteLIstLinks +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestWhiteLIstLinks (0.02s) +=== RUN TestWhiteListBlock +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestWhiteListBlock (0.02s) +=== RUN TestIgnored +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestIgnored (0.02s) +=== RUN TestBlacklistLinksMulti +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +--- PASS: TestBlacklistLinksMulti (0.02s) +=== RUN TestHealthCheckEndpoint +time="2015-03-20T06:06:09-04:00" level=info msg="TEST GET HEALTHCHECK" +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +--- PASS: TestHealthCheckEndpoint (0.02s) +=== RUN TestApiHandler +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg=GET +time="2015-03-20T06:06:09-04:00" level=info msg="Requesting API list" +--- PASS: TestApiHandler (0.02s) +=== RUN TestApiHandlerGetSingle +time="2015-03-20T06:06:09-04:00" level=info msg="TEST GET SINGLE API DEFINITION" +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg=GET +time="2015-03-20T06:06:09-04:00" level=info msg="Requesting API definition for1" +--- PASS: TestApiHandlerGetSingle (0.01s) +=== RUN TestKeyHandlerNewKey +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg="Tracked quota reset for key: 1234api_id=1" +time="2015-03-20T06:06:09-04:00" level=info msg="New key added or updated." key="1234api_id=1" +--- PASS: TestKeyHandlerNewKey (0.02s) +=== RUN TestKeyHandlerUpdateKey +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg="Tracked quota reset for key: 1234api_id=1" +time="2015-03-20T06:06:09-04:00" level=info msg="New key added or updated." key="1234api_id=1" +--- PASS: TestKeyHandlerUpdateKey (0.02s) +=== RUN TestKeyHandlerDeleteKey +time="2015-03-20T06:06:09-04:00" level=warning msg="Tracked quota reset for key: 1234" +time="2015-03-20T06:06:09-04:00" level=info msg="New key added or updated." key=1234 +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=info msg="Attempted key deletion - success." key=1234 +--- PASS: TestKeyHandlerDeleteKey (0.02s) +=== RUN TestCreateKeyHandlerCreateNewKey +time="2015-03-20T06:06:09-04:00" level=warning msg="Tracked quota reset for key: 1234" +time="2015-03-20T06:06:09-04:00" level=info msg="New key added or updated." key=1234 +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg="Tracked quota reset for key: 6b7ee0c159634eda55ff6c5511c751f9" +time="2015-03-20T06:06:09-04:00" level=info msg="Generated new key - success." key="6b7ee0c159634eda55ff6c5511c751f9" +--- PASS: TestCreateKeyHandlerCreateNewKey (0.01s) +=== RUN TestAPIAuthFail +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +time="2015-03-20T06:06:09-04:00" level=warning msg="Attempted administrative access with invalid or missing key!" +--- PASS: TestAPIAuthFail (0.02s) +=== RUN TestAPIAuthOk +time="2015-03-20T06:06:09-04:00" level=warning msg="CREATING TEMPORARY API" +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:09-04:00" level=info msg="Loading API Spec for: Tyk Test API ONE" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:09-04:00" level=warning msg="TEST Reload complete" +--- PASS: TestAPIAuthOk (0.02s) +=== RUN TestBatchSuccess +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestBatchSuccess (0.02s) +=== RUN TestMakeSyncRequest +time="2015-03-20T06:06:09-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:09-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestMakeSyncRequest (0.86s) +=== RUN TestMakeASyncRequest +time="2015-03-20T06:06:10-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:10-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:10-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:10-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:10-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:10-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestMakeASyncRequest (1.35s) +=== RUN TestNewValid +time="2015-03-20T06:06:11-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +--- PASS: TestNewValid (0.00s) +=== RUN TestNewInvlalid +time="2015-03-20T06:06:11-04:00" level=error msg="Format of webhook configuration is incorrect: json: cannot unmarshal number into Go value of type string" +time="2015-03-20T06:06:11-04:00" level=error msg="Problem getting configuration, skipping. json: cannot unmarshal number into Go value of type string" +--- PASS: TestNewInvlalid (0.00s) +=== RUN TestGetChecksum +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:11-04:00" level=warning msg="REQUEST: \nGET /get HTTP/1.1\r\nHost: httpbin.org\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 214\r\n\r\n\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\",\n \"timestamp\": 2014-11-27 12:52:05.944549825 +0000 GMT\n}\n\n\n\t" +--- PASS: TestGetChecksum (0.00s) +=== RUN TestBuildRequest +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +--- PASS: TestBuildRequest (0.00s) +=== RUN TestCreateBody +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +--- PASS: TestCreateBody (0.00s) +=== RUN TestGet +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:11-04:00" level=warning msg="REQUEST: \nGET /get HTTP/1.1\r\nHost: httpbin.org\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 135\r\n\r\n{\n \"event\": \"KeyExpired\",\n \"message\": \"THIS IS A TEST\",\n \"path\": \"/banana\",\n \"origin\": \"tyk.io\",\n \"key\": \"123456789\"\n}\n\n" +time="2015-03-20T06:06:11-04:00" level=warning msg="REQUEST: \nGET /get HTTP/1.1\r\nHost: httpbin.org\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 135\r\n\r\n{\n \"event\": \"KeyExpired\",\n \"message\": \"THIS IS A TEST\",\n \"path\": \"/banana\",\n \"origin\": \"tyk.io\",\n \"key\": \"123456789\"\n}\n\n" +time="2015-03-20T06:06:11-04:00" level=info msg="Event can fire, no duplicates found" +time="2015-03-20T06:06:11-04:00" level=warning msg="{\n \"args\": {}, \n \"headers\": {\n \"Accept-Encoding\": \"gzip\", \n \"Content-Length\": \"135\", \n \"Host\": \"httpbin.org\", \n \"User-Agent\": \"Tyk-Hookshot\", \n \"X-Tyk-Test\": \"TEST\"\n }, \n \"origin\": \"178.62.11.62\", \n \"url\": \"http://httpbin.org/get\"\n}\n" +time="2015-03-20T06:06:11-04:00" level=warning msg="Setting Webhook Checksum: 14e02a881d97645667c8bf2e822ac66d" +time="2015-03-20T06:06:11-04:00" level=warning msg="Test Checksum: 14e02a881d97645667c8bf2e822ac66d" +--- PASS: TestGet (0.28s) +=== RUN TestPost +time="2015-03-20T06:06:11-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:11-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 135\r\n\r\n{\n \"event\": \"KeyExpired\",\n \"message\": \"THIS IS A TEST\",\n \"path\": \"/banana\",\n \"origin\": \"tyk.io\",\n \"key\": \"123456789\"\n}\n\n" +time="2015-03-20T06:06:11-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 135\r\n\r\n{\n \"event\": \"KeyExpired\",\n \"message\": \"THIS IS A TEST\",\n \"path\": \"/banana\",\n \"origin\": \"tyk.io\",\n \"key\": \"123456789\"\n}\n\n" +time="2015-03-20T06:06:11-04:00" level=info msg="Event can fire, no duplicates found" +time="2015-03-20T06:06:12-04:00" level=warning msg="Successfully dumped 0 post variables.\nView it at http://www.posttestserver.com/data/2015/03/20/tyk/03.06.122095743497\nPost body was 135 chars long." +time="2015-03-20T06:06:12-04:00" level=warning msg="Setting Webhook Checksum: 145ce65bd8db3df8873e2e407db17d77" +time="2015-03-20T06:06:12-04:00" level=warning msg="Test Checksum: 145ce65bd8db3df8873e2e407db17d77" +--- PASS: TestPost (0.32s) +=== RUN TestExtendedBlacklistLinks +time="2015-03-20T06:06:12-04:00" level=info msg="Checking for transform paths..." +--- PASS: TestExtendedBlacklistLinks (0.01s) +=== RUN TestExtendedWhiteLIstLinks +time="2015-03-20T06:06:12-04:00" level=info msg="Checking for transform paths..." +--- PASS: TestExtendedWhiteLIstLinks (0.02s) +=== RUN TestExtendedWhiteListBlock +time="2015-03-20T06:06:12-04:00" level=info msg="Checking for transform paths..." +--- PASS: TestExtendedWhiteListBlock (0.02s) +=== RUN TestExtendedIgnored +time="2015-03-20T06:06:12-04:00" level=info msg="Checking for transform paths..." +--- PASS: TestExtendedIgnored (0.02s) +=== RUN TestExtendedWhiteListWithRedirectedReply +time="2015-03-20T06:06:12-04:00" level=info msg="Checking for transform paths..." +--- PASS: TestExtendedWhiteListWithRedirectedReply (0.02s) +=== RUN TestThrottling +time="2015-03-20T06:06:12-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:12-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:12-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:12-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:12-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Key rate limit exceeded." key=1234 origin= path="/about-lonelycoder/" +--- PASS: TestThrottling (0.97s) +=== RUN TestVersioningRequestOK +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestVersioningRequestOK (0.46s) +=== RUN TestVersioningRequestFail +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Attempted access to unauthorised API version." api_found=true key=1234 origin= path="/about-lonelycoder/" version_found=false +--- PASS: TestVersioningRequestFail (0.03s) +=== RUN TestIgnoredPathRequestOK +time="2015-03-20T06:06:13-04:00" level=info msg="Checking for transform paths..." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Attempted access with malformed header, no auth header found." origin= path="/v1/ignored/noregex" +--- PASS: TestIgnoredPathRequestOK (0.05s) +=== RUN TestWhitelistRequestReply +time="2015-03-20T06:06:13-04:00" level=info msg="Checking for transform paths..." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestWhitelistRequestReply (0.04s) +=== RUN TestQuota +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +time="2015-03-20T06:06:13-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:13-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +time="2015-03-20T06:06:13-04:00" level=info msg="Event can fire, no duplicates found" +time="2015-03-20T06:06:13-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +time="2015-03-20T06:06:13-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:13-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +time="2015-03-20T06:06:13-04:00" level=info msg="Event can fire, no duplicates found" +time="2015-03-20T06:06:13-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +--- FAIL: TestQuota (0.05s) + gateway_test.go:591: Initial request failed with non-200 code: + 403 +=== RUN TestWithAnalytics +time="2015-03-20T06:06:13-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:13-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +time="2015-03-20T06:06:13-04:00" level=info msg="Setting up analytics DB connection" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Event can fire, no duplicates found" +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:13-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:13-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:13-04:00" level=warning msg="Successfully dumped 0 post variables.\nView it at http://www.posttestserver.com/data/2015/03/20/tyk-event-test/03.06.131651979606\nPost body was 149 chars long." +time="2015-03-20T06:06:13-04:00" level=warning msg="Setting Webhook Checksum: 9e5ab7fafd341691ad3835e354c2c7db" +time="2015-03-20T06:06:14-04:00" level=warning msg="Successfully dumped 0 post variables.\nView it at http://www.posttestserver.com/data/2015/03/20/tyk-event-test/03.06.14803857329\nPost body was 149 chars long." +time="2015-03-20T06:06:14-04:00" level=warning msg="Setting Webhook Checksum: 9e5ab7fafd341691ad3835e354c2c7db" +time="2015-03-20T06:06:14-04:00" level=warning msg="Successfully dumped 0 post variables.\nView it at http://www.posttestserver.com/data/2015/03/20/tyk-event-test/03.06.14224709686\nPost body was 149 chars long." +time="2015-03-20T06:06:14-04:00" level=warning msg="Setting Webhook Checksum: 9e5ab7fafd341691ad3835e354c2c7db" +--- PASS: TestWithAnalytics (2.69s) +=== RUN TestWithAnalyticsErrorResponse +time="2015-03-20T06:06:16-04:00" level=info msg="Setting up analytics DB connection" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:16-04:00" level=warning msg="Timeout set to: 10" +time="2015-03-20T06:06:16-04:00" level=info msg="Init Event Handler: QuotaExceeded" +time="2015-03-20T06:06:16-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:16-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +time="2015-03-20T06:06:17-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +time="2015-03-20T06:06:17-04:00" level=info msg="Key quota limit exceeded." key=4321 origin= path="/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="LOG-HANDLER-PREFIX:QuotaExceeded:Key Quota Limit Exceeded:4321::/about-lonelycoder/" +time="2015-03-20T06:06:17-04:00" level=warning msg="REQUEST: \nPOST /post.php?dir=tyk-event-test HTTP/1.1\r\nHost: posttestserver.com\r\nUser-Agent: Go 1.1 package http\r\nContent-Length: 149\r\n\r\n{\n \"event\": \"QuotaExceeded\",\n \"message\": \"Key Quota Limit Exceeded\",\n \"path\": \"/about-lonelycoder/\",\n \"origin\": \"\",\n \"key\": \"4321\"\n}\n\n" +--- FAIL: TestWithAnalyticsErrorResponse (0.65s) + gateway_test.go:707: Request failed with 200 code: + 200 +=== RUN TestBasicAuthSession +time="2015-03-20T06:06:17-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestBasicAuthSession (0.56s) +=== RUN TestBasicAuthBadFormatting +time="2015-03-20T06:06:17-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Attempted access with malformed header, values not in basic auth format." origin= path="/" +--- PASS: TestBasicAuthBadFormatting (0.04s) +=== RUN TestBasicAuthBadData +time="2015-03-20T06:06:17-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Attempted access with malformed header, values not in basic auth format." origin= path="/" +--- PASS: TestBasicAuthBadData (0.04s) +=== RUN TestBasicAuthBadOverFormatting +time="2015-03-20T06:06:17-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Attempted access with malformed header, values not in basic auth format." origin= path="/" +--- PASS: TestBasicAuthBadOverFormatting (0.04s) +=== RUN TestBasicAuthWrongUser +time="2015-03-20T06:06:17-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:17-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- FAIL: TestBasicAuthWrongUser (0.54s) + middleware_basic_auth_test.go:263: Request should have failed and returned non-200 code!: + 200 + middleware_basic_auth_test.go:267: Request should have returned 403 code!: + 200 +=== RUN TestBasicMissingHeader +time="2015-03-20T06:06:18-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Attempted access with malformed header, no auth header found." origin= path="/" +--- PASS: TestBasicMissingHeader (0.03s) +=== RUN TestBasicAuthWrongPassword +time="2015-03-20T06:06:18-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Attempted access with existing user but failed password check." key=default4321 origin= path="/" +--- PASS: TestBasicAuthWrongPassword (0.04s) +=== RUN TestHMACAuthSession +time="2015-03-20T06:06:18-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Signature string: Signature keyId=\"9876\",algorithm=\"hmac-sha1\",signature=\"%2Fa0k2m1gvf0QI50ERyYeZKVyoUg%3D\"" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:18-04:00" level=info msg="Request Signature: /a0k2m1gvf0QI50ERyYeZKVyoUg=" +time="2015-03-20T06:06:18-04:00" level=info msg="Should be: /a0k2m1gvf0QI50ERyYeZKVyoUg=" +--- PASS: TestHMACAuthSession (0.57s) +=== RUN TestHMACAuthSessionFailureDateExpired +time="2015-03-20T06:06:19-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Signature string: Signature keyId=\"9876\",algorithm=\"hmac-sha1\",signature=\"SaGH92Yz0DX0wBGTBGpljJyTcwU%3D\"" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:19-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Date is out of allowed range." origin= path="/" +--- PASS: TestHMACAuthSessionFailureDateExpired (2.05s) +=== RUN TestHMACAuthSessionKeyMissing +time="2015-03-20T06:06:21-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Signature string: Signature keyId=\"98765\",algorithm=\"hmac-sha1\",signature=\"ZuzKvHe3JGM%2FNrz8n9BITtvw6NI%3D\"" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:21-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Date is out of allowed range." origin= path="/" +--- PASS: TestHMACAuthSessionKeyMissing (2.03s) +=== RUN TestHMACAuthSessionmalformedHeader +time="2015-03-20T06:06:23-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Signature string: Signature keyID=\"98765\", algorithm=\"hmac-sha1\", signature=\"iCce6ZvReVVpOj7Z%2BK%2Fi3yXlo4s%3D\"" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:23-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Date is out of allowed range." origin= path="/" +--- PASS: TestHMACAuthSessionmalformedHeader (2.05s) +=== RUN TestIpMiddlewareIPFail +time="2015-03-20T06:06:25-04:00" level=warning msg="CREATING TEMPORARY API FOR IP WHITELIST" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API Spec for: Tyk Test API - IPCONF Fail" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:25-04:00" level=warning msg="IP TEST Reload complete" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +--- PASS: TestIpMiddlewareIPFail (0.05s) +=== RUN TestIpMiddlewareIPPass +time="2015-03-20T06:06:25-04:00" level=warning msg="CREATING TEMPORARY API FOR IP WHITELIST" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API Spec for: Tyk Test API" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:25-04:00" level=warning msg="IP TEST Reload complete" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Key quota limit exceeded." key=1234 origin=127.0.0.1 path="/about-lonelycoder/" +--- FAIL: TestIpMiddlewareIPPass (0.03s) + middleware_ip_whitelist_test.go:229: Invalid response code, should be 200: + 403 { + "error": "Quota exceeded" + } 127.0.0.1 +=== RUN TestIpMiddlewareIPMissing +time="2015-03-20T06:06:25-04:00" level=warning msg="CREATING TEMPORARY API FOR IP WHITELIST" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API Spec for: Tyk Test API" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:25-04:00" level=warning msg="IP TEST Reload complete" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Key quota limit exceeded." key=1234 origin= path="/about-lonelycoder/" +--- FAIL: TestIpMiddlewareIPMissing (0.04s) + middleware_ip_whitelist_test.go:257: Invalid response code, should be 200: + 403 { + "error": "Quota exceeded" + } +=== RUN TestIpMiddlewareIPDisabled +time="2015-03-20T06:06:25-04:00" level=warning msg="CREATING TEMPORARY API FOR IP WHITELIST" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API configurations." +time="2015-03-20T06:06:25-04:00" level=info msg="Loading API Spec for: Tyk Test API" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Loading Middleware" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Rate limits available at: /v1tyk/rate-limits/" +time="2015-03-20T06:06:25-04:00" level=warning msg="IP TEST Reload complete" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Key quota limit exceeded." key=1234 origin= path="/about-lonelycoder/" +--- FAIL: TestIpMiddlewareIPDisabled (0.05s) + middleware_ip_whitelist_test.go:285: Invalid response code, should be 200: + 403 { + "error": "Quota exceeded" + } +=== RUN TestAuthCodeRedirect +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +--- PASS: TestAuthCodeRedirect (0.05s) +=== RUN TestAPIClientAuthorizeAuthCode +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +--- PASS: TestAPIClientAuthorizeAuthCode (0.03s) +=== RUN TestAPIClientAuthorizeToken +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +--- PASS: TestAPIClientAuthorizeToken (0.04s) +=== RUN TestClientAccessRequest +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +time="2015-03-20T06:06:25-04:00" level=info msg="Notifying client host" +--- PASS: TestClientAccessRequest (0.09s) +=== RUN TestClientRefreshRequest +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +time="2015-03-20T06:06:25-04:00" level=info msg="Notifying client host" +time="2015-03-20T06:06:25-04:00" level=warning msg="Path-based version path list settings are being deprecated, please upgrade your defintitions to the new standard as soon as spossible" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Health Checker initialised." +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=info msg="Connecting to redis on: localhost:6379" +time="2015-03-20T06:06:25-04:00" level=warning msg="Adding test client" +time="2015-03-20T06:06:25-04:00" level=warning msg="Test client added" +time="2015-03-20T06:06:25-04:00" level=info msg="Notifying client host" +--- PASS: TestClientRefreshRequest (0.15s) +FAIL +exit status 1 +FAIL github.com/lonelycode/tyk 16.753s