Use consistent templating for all tests

This commit is contained in:
Liam Newman
2020-02-25 14:43:03 -08:00
parent 66de06956c
commit 46a141db9c
40 changed files with 108 additions and 99 deletions

View File

@@ -1,6 +1,8 @@
package org.kohsuke.github;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsCurrentDateHelper;
import org.apache.commons.io.IOUtils;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
@@ -11,6 +13,8 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.kohsuke.github.junit.GitHubWireMockRule;
import wiremock.com.github.jknack.handlebars.Helper;
import wiremock.com.github.jknack.handlebars.Options;
import java.io.File;
import java.io.FileInputStream;
@@ -48,6 +52,8 @@ public abstract class AbstractGitHubWireMockTest extends Assert {
@Rule
public final GitHubWireMockRule mockGitHub;
protected final TemplatingHelper templating = new TemplatingHelper();
public AbstractGitHubWireMockTest() {
mockGitHub = new GitHubWireMockRule(this.getWireMockOptions());
}
@@ -285,4 +291,23 @@ public abstract class AbstractGitHubWireMockTest extends Assert {
assertThat(condition, Matchers.is(false));
}
protected static class TemplatingHelper {
public Date testStartDate = new Date();
public ResponseTemplateTransformer newResponseTransformer() {
testStartDate = new Date();
return ResponseTemplateTransformer.builder()
.global(true)
.maxCacheEntries(0L)
.helper("testStartDate", new Helper<Object>() {
private HandlebarsCurrentDateHelper helper = new HandlebarsCurrentDateHelper();
@Override
public Object apply(final Object context, final Options options) throws IOException {
return this.helper.apply(TemplatingHelper.this.testStartDate, options);
}
})
.build();
}
}
}

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import org.junit.Test;
import java.io.IOException;
@@ -36,8 +35,7 @@ public class AbuseLimitHandlerTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions()
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Test

View File

@@ -3,15 +3,14 @@ package org.kohsuke.github;
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
import com.fasterxml.jackson.databind.exc.ValueInstantiationException;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import org.hamcrest.CoreMatchers;
import org.junit.Test;
import java.io.IOException;
import java.time.Duration;
import java.util.Date;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
/**
@@ -43,8 +42,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions()
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Test
@@ -55,11 +53,9 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
assertThat(mockGitHub.getRequestCount(), equalTo(0));
// 4897 is just the what the limit was when the snapshot was taken
previousLimit = GHRateLimit
.fromHeaderRecord(new GHRateLimit.Record(5000, 4897, System.currentTimeMillis() / 1000L));
// Give this a moment
Thread.sleep(1000);
previousLimit = GHRateLimit.fromHeaderRecord(new GHRateLimit.Record(5000,
4897,
(templating.testStartDate.getTime() + Duration.ofHours(1).toMillis()) / 1000L));
// -------------------------------------------------------------
// /user gets response with rate limit information
@@ -90,6 +86,9 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
rateLimit = gitHub.getRateLimit();
assertThat(mockGitHub.getRequestCount(), equalTo(2));
// Because remaining and reset date are unchanged, the header should be unchanged as well
assertThat(gitHub.lastRateLimit(), sameInstance(headerRateLimit));
// rate limit request is free, remaining is unchanged
verifyRateLimitValues(previousLimit, previousLimit.getRemaining());
previousLimit = rateLimit;
@@ -101,6 +100,9 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
rateLimit = gitHub.getRateLimit();
assertThat(mockGitHub.getRequestCount(), equalTo(3));
// Because remaining and reset date are unchanged, the header should be unchanged as well
assertThat(gitHub.lastRateLimit(), sameInstance(headerRateLimit));
// rate limit request is free, remaining is unchanged
verifyRateLimitValues(previousLimit, previousLimit.getRemaining());
previousLimit = rateLimit;
@@ -108,6 +110,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
gitHub.getOrganization(GITHUB_API_TEST_ORG);
assertThat(mockGitHub.getRequestCount(), equalTo(4));
// Because remaining has changed the header should be different
assertThat(gitHub.lastRateLimit(), not(sameInstance(headerRateLimit)));
assertThat(gitHub.lastRateLimit(), not(equalTo(headerRateLimit)));
rateLimit = gitHub.lastRateLimit();
@@ -118,10 +122,12 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
headerRateLimit = rateLimit;
// ratelimit() should prefer headerRateLimit when it is most recent and not expired
assertThat(gitHub.rateLimit(), equalTo(headerRateLimit));
assertThat(gitHub.rateLimit(), sameInstance(headerRateLimit));
assertThat(mockGitHub.getRequestCount(), equalTo(4));
// AT THIS POINT WE SIMULATE A RATE LIMIT RESET
// Give this a moment
Thread.sleep(2000);
@@ -129,8 +135,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
rateLimit = gitHub.getRateLimit();
assertThat(mockGitHub.getRequestCount(), equalTo(5));
// rate limit request is free, remaining is unchanged
verifyRateLimitValues(previousLimit, previousLimit.getRemaining());
// rate limit request is free, remaining is unchanged date is later
verifyRateLimitValues(previousLimit, previousLimit.getRemaining(), true);
previousLimit = rateLimit;
// When getRateLimit() succeeds, headerRateLimit updates as usual as well (if needed)
@@ -142,7 +148,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
// Verify different instances can be compared
// TODO: This is not work currently because the header rate limit has unknowns for records other than core.
// assertThat(gitHub.rateLimit().getCore(), equalTo(rateLimit.getCore()));
// assertThat(gitHub.rateLimit(), equalTo(rateLimit));
assertThat(gitHub.rateLimit(), not(sameInstance(headerRateLimit)));
assertThat(gitHub.rateLimit(), sameInstance(gitHub.lastRateLimit()));
@@ -151,13 +157,20 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
}
private void verifyRateLimitValues(GHRateLimit previousLimit, int remaining) {
verifyRateLimitValues(previousLimit, remaining, false);
}
private void verifyRateLimitValues(GHRateLimit previousLimit, int remaining, boolean changedResetDate) {
// newer or unchange
int resetComparisionValue = changedResetDate ? 1 : 0;
// Basic checks of values
assertThat(rateLimit, notNullValue());
assertThat(rateLimit.getLimit(), equalTo(previousLimit.getLimit()));
assertThat(rateLimit.getRemaining(), equalTo(remaining));
// Check that the reset date of the current limit is not older than the previous one
assertThat(rateLimit.getResetDate().compareTo(previousLimit.getResetDate()), greaterThanOrEqualTo(0));
assertThat(rateLimit.getResetDate().compareTo(previousLimit.getResetDate()), equalTo(resetComparisionValue));
// Additional checks for record values
assertThat(rateLimit.getCore().getLimit(), equalTo(rateLimit.getLimit()));
@@ -257,7 +270,8 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
assertThat(rateLimit, notNullValue());
assertThat(rateLimit.getLimit(), equalTo(5000));
assertThat(rateLimit.getRemaining(), equalTo(4978));
assertThat(rateLimit.getResetDate().compareTo(lastReset), greaterThanOrEqualTo(0));
// The previous record was an "Unknown", so even though this records resets sooner we take it
assertThat(rateLimit.getResetDate().compareTo(lastReset), equalTo(-1));
lastReset = rateLimit.getResetDate();
GHRateLimit headerRateLimit = rateLimit;
@@ -266,7 +280,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
Thread.sleep(1000);
// ratelimit() uses headerRateLimit if available and headerRateLimit is not expired
assertThat(gitHub.rateLimit(), equalTo(headerRateLimit));
assertThat(gitHub.rateLimit(), sameInstance(headerRateLimit));
assertThat(mockGitHub.getRequestCount(), equalTo(5));
@@ -365,7 +379,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
assertThat("rateLimit() selects header instance when not expired, does not ask server",
gitHub.rateLimit(),
sameInstance(headerRateLimit));
assertThat("rateLimit() selects header instance when not expired, does not ask server",
assertThat("lastRateLimit() always selects header instance, does not ask server",
gitHub.lastRateLimit(),
sameInstance(headerRateLimit));

View File

@@ -1,11 +1,7 @@
package org.kohsuke.github;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsCurrentDateHelper;
import org.junit.Test;
import wiremock.com.github.jknack.handlebars.Helper;
import wiremock.com.github.jknack.handlebars.Options;
import java.io.IOException;
import java.util.Date;
@@ -22,7 +18,6 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
GHRateLimit rateLimit = null;
GHRateLimit previousLimit = null;
Date testStartDate = new Date();
public RateLimitCheckerTest() {
useDefaultGitHub = false;
@@ -30,18 +25,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions().extensions(ResponseTemplateTransformer.builder()
.global(true)
.maxCacheEntries(0L)
.helper("testStartDate", new Helper<Object>() {
private HandlebarsCurrentDateHelper helper = new HandlebarsCurrentDateHelper();
@Override
public Object apply(final Object context, final Options options) throws IOException {
return this.helper.apply(RateLimitCheckerTest.this.testStartDate, options);
}
})
.build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Test
@@ -51,14 +35,10 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
assertThat(mockGitHub.getRequestCount(), equalTo(0));
// // 4897 is just the what the limit was when the snapshot was taken
// previousLimit = GHRateLimit
// .fromHeaderRecord(new GHRateLimit.Record(5000, 4897, System.currentTimeMillis() / 1000L));
// Give this a moment
Thread.sleep(1000);
testStartDate = new Date();
templating.testStartDate = new Date();
// -------------------------------------------------------------
// /user gets response with rate limit information
gitHub = getGitHubBuilder().withRateLimitChecker(new RateLimitChecker.LiteralValue(4500))

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import org.junit.Test;
import java.io.IOException;
@@ -36,8 +35,7 @@ public class RateLimitHandlerTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions()
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Test

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github.extras;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;
@@ -36,8 +35,7 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions()
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Before

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github.extras;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;
@@ -66,8 +65,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest {
@Override
protected WireMockConfiguration getWireMockOptions() {
return super.getWireMockOptions()
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
}
@Before

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github.extras.okhttp3;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
import org.apache.commons.io.FileUtils;
@@ -38,7 +37,7 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest {
return super.getWireMockOptions()
// Use the same data files as the 2.x test
.usingFilesUnderDirectory(baseRecordPath.replace("/okhttp3/", "/"))
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
.extensions(templating.newResponseTransformer());
}
@Before

View File

@@ -1,7 +1,6 @@
package org.kohsuke.github.extras.okhttp3;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
@@ -72,7 +71,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest {
return super.getWireMockOptions()
// Use the same data files as the 2.x test
.usingFilesUnderDirectory(baseRecordPath.replace("/okhttp3/", "/"))
.extensions(ResponseTemplateTransformer.builder().global(true).maxCacheEntries(0L).build());
.extensions(templating.newResponseTransformer());
}
@Before

View File

@@ -21,7 +21,7 @@
"Retry-After": "30",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4000",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -14,13 +14,13 @@
"status": 200,
"bodyFileName": "user-a60baf84-5b5c-4f86-af3d-cab0d609c7b2.json",
"headers": {
"Date": "Thu, 06 Feb 2020 18:33:32 GMT",
"Date": "{{now 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": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -21,7 +21,7 @@
"Retry-After": "30",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4000",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -14,13 +14,13 @@
"status": 200,
"bodyFileName": "user-a60baf84-5b5c-4f86-af3d-cab0d609c7b2.json",
"headers": {
"Date": "Thu, 06 Feb 2020 18:33:32 GMT",
"Date": "{{now 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": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -21,7 +21,7 @@
"Retry-After": "2",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4000",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -14,13 +14,13 @@
"status": 200,
"bodyFileName": "user-a60baf84-5b5c-4f86-af3d-cab0d609c7b2.json",
"headers": {
"Date": "Thu, 06 Feb 2020 18:33:32 GMT",
"Date": "{{now 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": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -21,7 +21,7 @@
"Retry-After": "3",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4000",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -14,13 +14,13 @@
"status": 200,
"bodyFileName": "user-a60baf84-5b5c-4f86-af3d-cab0d609c7b2.json",
"headers": {
"Date": "Thu, 06 Feb 2020 18:33:32 GMT",
"Date": "{{now 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": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4978",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='1 hours' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -3,22 +3,22 @@
"core": {
"limit": 5000,
"remaining": 4896,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='63 minutes' format='unix'}}
},
"search": {
"limit": 30,
"remaining": 30,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"graphql": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"integration_manifest": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
}
},
"rate": {

View File

@@ -3,22 +3,22 @@
"core": {
"limit": 5000,
"remaining": 4897,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"search": {
"limit": 30,
"remaining": 30,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"graphql": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"integration_manifest": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
}
},
"rate": {

View File

@@ -3,22 +3,22 @@
"core": {
"limit": 5000,
"remaining": 4897,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"search": {
"limit": 30,
"remaining": 30,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"graphql": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
},
"integration_manifest": {
"limit": 5000,
"remaining": 5000,
"reset": {{now offset='1 hours' format='unix'}}
"reset": {{testStartDate offset='1 hours' format='unix'}}
}
},
"rate": {

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4896",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='1 hours' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4897",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='1 hours' 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": "",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4897",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='1 hours' 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": "",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4896",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='63 minutes' 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": "",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4897",
"X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='1 hours' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "403 Forbidden",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "403 Forbidden",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "403 Forbidden",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4922",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "403 Forbidden",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "0",
"X-RateLimit-Reset": "{{now offset='2 seconds' format='unix'}}",
"X-RateLimit-Reset": "{{testStartDate offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",

View File

@@ -20,7 +20,7 @@
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4930",
"X-RateLimit-Reset": "1581014122",
"X-RateLimit-Reset": "{{now offset='3 seconds' format='unix'}}",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",