-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for server time ahead and behind local time
Sometimes adding tests finds broken product code. Sometimes it finds broken test environment. This was the latter. The wiremock templating returns dates in UTC format not RFC-1123 format.
- Loading branch information
1 parent
bb3a492
commit 37de3a4
Showing
29 changed files
with
627 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...rationServerFiveMinutesAhead/__files/rate_limit-4e2fc33b-fb25-4dfc-9d56-34f9b4d707be.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"resources": { | ||
"core": { | ||
"limit": 5000, | ||
"remaining": 4896, | ||
"reset": 1570478899 | ||
}, | ||
"search": { | ||
"limit": 30, | ||
"remaining": 30, | ||
"reset": 1570478180 | ||
}, | ||
"graphql": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
}, | ||
"integration_manifest": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
} | ||
}, | ||
"rate": { | ||
"limit": 5000, | ||
"remaining": 4896, | ||
"reset": {{now offset='305 seconds' format='unix'}} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...rationServerFiveMinutesAhead/__files/rate_limit-a1f82a96-500c-4462-ae7b-e0159afa8208.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"resources": { | ||
"core": { | ||
"limit": 5000, | ||
"remaining": 4897, | ||
"reset": 1570478899 | ||
}, | ||
"search": { | ||
"limit": 30, | ||
"remaining": 30, | ||
"reset": 1570478180 | ||
}, | ||
"graphql": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
}, | ||
"integration_manifest": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
} | ||
}, | ||
"rate": { | ||
"limit": 5000, | ||
"remaining": 4897, | ||
"reset": {{now offset='305 seconds' format='unix'}} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...rationServerFiveMinutesAhead/__files/rate_limit-f22b1cea-3679-481d-8b95-459b2c47bf98.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"resources": { | ||
"core": { | ||
"limit": 5000, | ||
"remaining": 4897, | ||
"reset": 1570478899 | ||
}, | ||
"search": { | ||
"limit": 30, | ||
"remaining": 30, | ||
"reset": 1570478180 | ||
}, | ||
"graphql": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
}, | ||
"integration_manifest": { | ||
"limit": 5000, | ||
"remaining": 5000, | ||
"reset": 1570481642 | ||
} | ||
}, | ||
"rate": { | ||
"limit": 5000, | ||
"remaining": 4897, | ||
"reset": {{now offset='305 seconds' format='unix'}} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...itExpirationServerFiveMinutesAhead/__files/user-a460fd69-99f3-46c7-aeb1-888c34085d4a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"login": "bitwiseman", | ||
"id": 1958953, | ||
"node_id": "MDQ6VXNlcjE5NTg5NTM=", | ||
"avatar_url": "https://avatars3.githubusercontent.com/u/1958953?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/bitwiseman", | ||
"html_url": "https://github.com/bitwiseman", | ||
"followers_url": "https://api.github.com/users/bitwiseman/followers", | ||
"following_url": "https://api.github.com/users/bitwiseman/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/bitwiseman/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/bitwiseman/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/bitwiseman/subscriptions", | ||
"organizations_url": "https://api.github.com/users/bitwiseman/orgs", | ||
"repos_url": "https://api.github.com/users/bitwiseman/repos", | ||
"events_url": "https://api.github.com/users/bitwiseman/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/bitwiseman/received_events", | ||
"type": "User", | ||
"site_admin": false, | ||
"name": "Liam Newman", | ||
"company": "Cloudbees, Inc.", | ||
"blog": "", | ||
"location": "Seattle, WA, USA", | ||
"email": "[email protected]", | ||
"hireable": null, | ||
"bio": "https://twitter.com/bitwiseman", | ||
"public_repos": 168, | ||
"public_gists": 4, | ||
"followers": 136, | ||
"following": 9, | ||
"created_at": "2012-07-11T20:38:33Z", | ||
"updated_at": "2019-09-24T19:32:29Z", | ||
"private_gists": 7, | ||
"total_private_repos": 9, | ||
"owned_private_repos": 0, | ||
"disk_usage": 33697, | ||
"collaborators": 0, | ||
"two_factor_authentication": true, | ||
"plan": { | ||
"name": "free", | ||
"space": 976562499, | ||
"collaborators": 0, | ||
"private_repos": 10000 | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...ock/testGitHubRateLimitExpirationServerFiveMinutesAhead/mappings/rate_limit-2-f22b1c.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"id": "f22b1cea-3679-481d-8b95-459b2c47bf98", | ||
"name": "rate_limit", | ||
"request": { | ||
"url": "/rate_limit", | ||
"method": "GET" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "rate_limit-f22b1cea-3679-481d-8b95-459b2c47bf98.json", | ||
"headers": { | ||
"Date": "{{now offset='5 minutes' timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", | ||
"Content-Type": "application/json; charset=utf-8", | ||
"Server": "GitHub.com", | ||
"Status": "200 OK", | ||
"X-RateLimit-Limit": "5000", | ||
"X-RateLimit-Remaining": "4897", | ||
"X-RateLimit-Reset": "{{now offset='303 seconds' format='unix'}}", | ||
"Cache-Control": "no-cache", | ||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", | ||
"X-Accepted-OAuth-Scopes": "", | ||
"X-GitHub-Media-Type": "unknown, github.v3", | ||
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", | ||
"Access-Control-Allow-Origin": "*", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", | ||
"X-Frame-Options": "deny", | ||
"X-Content-Type-Options": "nosniff", | ||
"X-XSS-Protection": "1; mode=block", | ||
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", | ||
"Content-Security-Policy": "default-src 'none'", | ||
"Vary": "Accept-Encoding", | ||
"X-GitHub-Request-Id": "E39F:3620:2D9D346:369B91A:5D9B9848" | ||
} | ||
}, | ||
"uuid": "f22b1cea-3679-481d-8b95-459b2c47bf98", | ||
"persistent": true, | ||
"scenarioName": "scenario-1-rate_limit", | ||
"requiredScenarioState": "Started", | ||
"newScenarioState": "scenario-1-rate_limit-2", | ||
"insertionIndex": 2 | ||
} |
41 changes: 41 additions & 0 deletions
41
...ock/testGitHubRateLimitExpirationServerFiveMinutesAhead/mappings/rate_limit-3-a1f82a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"id": "a1f82a96-500c-4462-ae7b-e0159afa8208", | ||
"name": "rate_limit", | ||
"request": { | ||
"url": "/rate_limit", | ||
"method": "GET" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "rate_limit-a1f82a96-500c-4462-ae7b-e0159afa8208.json", | ||
"headers": { | ||
"Date": "{{now offset='5 minutes' timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", | ||
"Content-Type": "application/json; charset=utf-8", | ||
"Server": "GitHub.com", | ||
"Status": "200 OK", | ||
"X-RateLimit-Limit": "5000", | ||
"X-RateLimit-Remaining": "4897", | ||
"X-RateLimit-Reset": "{{now offset='303 seconds' format='unix'}}", | ||
"Cache-Control": "no-cache", | ||
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion", | ||
"X-Accepted-OAuth-Scopes": "", | ||
"X-GitHub-Media-Type": "unknown, github.v3", | ||
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type", | ||
"Access-Control-Allow-Origin": "*", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", | ||
"X-Frame-Options": "deny", | ||
"X-Content-Type-Options": "nosniff", | ||
"X-XSS-Protection": "1; mode=block", | ||
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin", | ||
"Content-Security-Policy": "default-src 'none'", | ||
"Vary": "Accept-Encoding", | ||
"X-GitHub-Request-Id": "E39F:3620:2D9D3B3:369BA1D:5D9B984A" | ||
} | ||
}, | ||
"uuid": "a1f82a96-500c-4462-ae7b-e0159afa8208", | ||
"persistent": true, | ||
"scenarioName": "scenario-1-rate_limit", | ||
"requiredScenarioState": "scenario-1-rate_limit-2", | ||
"newScenarioState": "scenario-1-rate_limit-3", | ||
"insertionIndex": 3 | ||
} |
Oops, something went wrong.