diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 437b6ae0e..083b4558c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,4 +7,4 @@ We love getting PRs, but we hate asking people for the same basic changes every - [ ] Push your changes to a branch other than `master`. Create your PR from that branch. - [ ] Add JavaDocs and other comments - [ ] Write tests that run and pass in CI. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to capture snapshot data. -- [ ] Run `mvn -P ci install site` locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI. +- [ ] Run `mvn -D enable-ci install site` locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI. diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 48a5adb9e..c285c5e33 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -1,22 +1,68 @@ -name: Java CI Build and Test +name: CI on: [push, pull_request] jobs: build: - + name: build-only (Java ${{ matrix.java }}) runs-on: ubuntu-latest strategy: matrix: - java: [ '1.8.0', '11.0.x', '13.0.x' ] + java: [ 11 ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cached .m2 + uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Maven Install (skipTests) + run: mvn -B install -DskipTests -D enable-ci --file pom.xml + site: + name: site (Java ${{ matrix.java }}) + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 11 ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Maven Site + run: mvn -B site -D enable-ci --file pom.xml + test: + name: test (${{ matrix.os }}, Java ${{ matrix.java }}) + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ ubuntu, windows ] + java: [ 8, 11, 13 ] steps: - uses: actions/checkout@v2 - name: Set up JDK uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - - name: Maven Download all dependencies - run: mvn -B org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline -P ci - - name: Maven Build - run: mvn -B install site -P ci --file pom.xml + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Maven Install + run: mvn -B install --file pom.xml diff --git a/pom.xml b/pom.xml index ae684daea..2f0f18d23 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.kohsuke github-api - 1.104-SNAPSHOT + 1.107-SNAPSHOT GitHub API for Java https://github-api.kohsuke.org/ GitHub API for Java @@ -203,7 +203,13 @@ org.kohsuke.github.GHPerson.1 org.kohsuke.github.GHPerson.1.1 + + org.kohsuke.github.GHAsset + org.kohsuke.github.GHReleaseBuilder + org.kohsuke.github.GHRelease + + org.kohsuke.github.GitHub.GHApiInfo org.kohsuke.github.GHBranchProtection.RequiredSignatures org.kohsuke.github.GHBranchProtectionBuilder.Restrictions org.kohsuke.github.GHBranchProtection.Restrictions @@ -467,7 +473,7 @@ commons-io commons-io - 2.6 + 2.4 com.infradna.tool @@ -579,15 +585,28 @@ - ci + ci-non-windows + + + enable-ci + + + !windows + + + + validate + check + + + + ci-all enable-ci - validate - check true diff --git a/src/main/java/org/kohsuke/github/GHOrganization.java b/src/main/java/org/kohsuke/github/GHOrganization.java index 0f85137ef..38abd0acd 100644 --- a/src/main/java/org/kohsuke/github/GHOrganization.java +++ b/src/main/java/org/kohsuke/github/GHOrganization.java @@ -88,7 +88,7 @@ public class GHOrganization extends GHPerson { * *

* You use the returned builder to set various properties, then call {@link GHCreateRepositoryBuilder#create()} to - * finally createa repository. + * finally create a repository. * * @param name * the name @@ -386,7 +386,7 @@ public class GHOrganization extends GHPerson { * @throws IOException * the io exception * @deprecated https://developer.github.com/v3/teams/#create-team deprecates permission field use - * {@link #createTeam(String, Collection)} + * {@link #createTeam(String)} */ @Deprecated public GHTeam createTeam(String name, Permission p, Collection repositories) throws IOException { @@ -412,7 +412,7 @@ public class GHOrganization extends GHPerson { * @throws IOException * the io exception * @deprecated https://developer.github.com/v3/teams/#create-team deprecates permission field use - * {@link #createTeam(String, GHRepository...)} + * {@link #createTeam(String)} */ @Deprecated public GHTeam createTeam(String name, Permission p, GHRepository... repositories) throws IOException { @@ -429,7 +429,9 @@ public class GHOrganization extends GHPerson { * @return the gh team * @throws IOException * the io exception + * @deprecated Use {@link #createTeam(String)} that uses a builder pattern to let you control every aspect. */ + @Deprecated public GHTeam createTeam(String name, Collection repositories) throws IOException { Requester post = root.createRequest().method("POST").with("name", name); List repo_names = new ArrayList(); @@ -450,11 +452,28 @@ public class GHOrganization extends GHPerson { * @return the gh team * @throws IOException * the io exception + * @deprecated Use {@link #createTeam(String)} that uses a builder pattern to let you control every aspect. */ + @Deprecated public GHTeam createTeam(String name, GHRepository... repositories) throws IOException { return createTeam(name, Arrays.asList(repositories)); } + /** + * Starts a builder that creates a new team. + * + *

+ * You use the returned builder to set various properties, then call {@link GHTeamBuilder#create()} to finally + * create a team. + * + * @param name + * the name + * @return the gh create repository builder + */ + public GHTeamBuilder createTeam(String name) { + return new GHTeamBuilder(root, login, name); + } + /** * List up repositories that has some open pull requests. *

diff --git a/src/main/java/org/kohsuke/github/GHRepositoryStatistics.java b/src/main/java/org/kohsuke/github/GHRepositoryStatistics.java index 4d3f99c54..60e7d9162 100644 --- a/src/main/java/org/kohsuke/github/GHRepositoryStatistics.java +++ b/src/main/java/org/kohsuke/github/GHRepositoryStatistics.java @@ -1,14 +1,12 @@ package org.kohsuke.github; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.MismatchedInputException; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; -import java.io.InputStream; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.NoSuchElementException; @@ -317,20 +315,17 @@ public class GHRepositoryStatistics { * the io exception */ public List getCodeFrequency() throws IOException { - // Map to ArrayLists first, since there are no field names in the + // Map to arrays first, since there are no field names in the // returned JSON. try { - InputStream stream = root.createRequest().withUrlPath(getApiTailUrl("code_frequency")).fetchStream(); - - ObjectMapper mapper = new ObjectMapper(); - TypeReference>> typeRef = new TypeReference>>() { - }; - ArrayList> list = mapper.readValue(stream, typeRef); + Integer[][] list = root.createRequest() + .withUrlPath(getApiTailUrl("code_frequency")) + .fetch(Integer[][].class); // Convert to proper objects. - ArrayList returnList = new ArrayList(); - for (ArrayList item : list) { - CodeFrequency cf = new CodeFrequency(item); + List returnList = new ArrayList<>(); + for (Integer[] item : list) { + CodeFrequency cf = new CodeFrequency(Arrays.asList(item)); returnList.add(cf); } @@ -351,7 +346,7 @@ public class GHRepositoryStatistics { private int additions; private int deletions; - private CodeFrequency(ArrayList item) { + private CodeFrequency(List item) { week = item.get(0); additions = item.get(1); deletions = item.get(2); @@ -462,17 +457,12 @@ public class GHRepositoryStatistics { public List getPunchCard() throws IOException { // Map to ArrayLists first, since there are no field names in the // returned JSON. - InputStream stream = root.createRequest().withUrlPath(getApiTailUrl("punch_card")).fetchStream(); - - ObjectMapper mapper = new ObjectMapper(); - TypeReference>> typeRef = new TypeReference>>() { - }; - ArrayList> list = mapper.readValue(stream, typeRef); + Integer[][] list = root.createRequest().withUrlPath(getApiTailUrl("punch_card")).fetch(Integer[][].class); // Convert to proper objects. - ArrayList returnList = new ArrayList(); - for (ArrayList item : list) { - PunchCardItem pci = new PunchCardItem(item); + ArrayList returnList = new ArrayList<>(); + for (Integer[] item : list) { + PunchCardItem pci = new PunchCardItem(Arrays.asList(item)); returnList.add(pci); } @@ -487,7 +477,7 @@ public class GHRepositoryStatistics { private int hourOfDay; private int numberOfCommits; - private PunchCardItem(ArrayList item) { + private PunchCardItem(List item) { dayOfWeek = item.get(0); hourOfDay = item.get(1); numberOfCommits = item.get(2); diff --git a/src/main/java/org/kohsuke/github/GHTeam.java b/src/main/java/org/kohsuke/github/GHTeam.java index c74f634ae..2870cb688 100644 --- a/src/main/java/org/kohsuke/github/GHTeam.java +++ b/src/main/java/org/kohsuke/github/GHTeam.java @@ -12,12 +12,22 @@ import java.util.TreeMap; * @author Kohsuke Kawaguchi */ public class GHTeam implements Refreshable { - private String name, permission, slug, description; + private String name; + private String permission; + private String slug; + private String description; + private Privacy privacy; + private int id; private GHOrganization organization; // populated by GET /user/teams where Teams+Orgs are returned together protected /* final */ GitHub root; + public enum Privacy { + SECRET, // only visible to organization owners and members of this team. + CLOSED // visible to all members of this organization. + } + /** * Member's role in a team */ @@ -94,6 +104,15 @@ public class GHTeam implements Refreshable { return description; } + /** + * Gets the privacy state. + * + * @return the privacy state. + */ + public Privacy getPrivacy() { + return privacy; + } + /** * Sets description. * @@ -106,6 +125,18 @@ public class GHTeam implements Refreshable { root.createRequest().method("PATCH").with("description", description).withUrlPath(api("")).send(); } + /** + * Updates the team's privacy setting. + * + * @param privacy + * the privacy + * @throws IOException + * the io exception + */ + public void setPrivacy(Privacy privacy) throws IOException { + root.createRequest().method("PATCH").with("privacy", privacy).withUrlPath(api("")).send(); + } + /** * Gets id. * diff --git a/src/main/java/org/kohsuke/github/GHTeamBuilder.java b/src/main/java/org/kohsuke/github/GHTeamBuilder.java new file mode 100644 index 000000000..881c00ef8 --- /dev/null +++ b/src/main/java/org/kohsuke/github/GHTeamBuilder.java @@ -0,0 +1,93 @@ +package org.kohsuke.github; + +import java.io.IOException; + +/** + * Creates a team. + * + * https://developer.github.com/v3/teams/#create-team + */ +public class GHTeamBuilder { + + private final GitHub root; + protected final Requester builder; + private final String orgName; + + public GHTeamBuilder(GitHub root, String orgName, String name) { + this.root = root; + this.orgName = orgName; + this.builder = root.createRequest(); + this.builder.with("name", name); + } + + /** + * Description for this team. + * + * @param description + * description of team + * @return a builder to continue with building + */ + public GHTeamBuilder description(String description) { + this.builder.with("description", description); + return this; + } + + /** + * Maintainers for this team. + * + * @param maintainers + * maintainers of team + * @return a builder to continue with building + */ + public GHTeamBuilder maintainers(String... maintainers) { + this.builder.with("maintainers", maintainers); + return this; + } + + /** + * Repository names to add this team to. + * + * @param repoNames + * repoNames to add team to + * @return a builder to continue with building + */ + public GHTeamBuilder repositories(String... repoNames) { + this.builder.with("repo_names", repoNames); + return this; + } + + /** + * Description for this team + * + * @param privacy + * privacy of team + * @return a builder to continue with building + */ + public GHTeamBuilder privacy(GHTeam.Privacy privacy) { + this.builder.with("privacy", privacy); + return this; + } + + /** + * Parent team id for this team + * + * @param parentTeamId + * parentTeamId of team + * @return a builder to continue with building + */ + public GHTeamBuilder parentTeamId(int parentTeamId) { + this.builder.with("parent_team_id", parentTeamId); + return this; + } + + /** + * Creates a team with all the parameters. + * + * @return the gh team + * @throws IOException + * if team cannot be created + */ + public GHTeam create() throws IOException { + return builder.method("POST").withUrlPath("/orgs/" + orgName + "/teams").fetch(GHTeam.class).wrapUp(root); + } +} diff --git a/src/main/java/org/kohsuke/github/Requester.java b/src/main/java/org/kohsuke/github/Requester.java index c7c82f644..3bda2288c 100644 --- a/src/main/java/org/kohsuke/github/Requester.java +++ b/src/main/java/org/kohsuke/github/Requester.java @@ -31,6 +31,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.InterruptedIOException; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.lang.reflect.Array; @@ -38,6 +39,7 @@ import java.lang.reflect.Field; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.ProtocolException; +import java.net.SocketException; import java.net.SocketTimeoutException; import java.net.URI; import java.net.URISyntaxException; @@ -61,6 +63,7 @@ import java.util.zip.GZIPInputStream; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import javax.annotation.WillClose; +import javax.net.ssl.SSLHandshakeException; import static java.util.Arrays.asList; import static java.util.logging.Level.*; @@ -74,6 +77,7 @@ import static org.kohsuke.github.GitHub.connect; * @author Kohsuke Kawaguchi */ class Requester { + public static final int CONNECTION_ERROR_RETRIES = 2; private final GitHub root; private final List args = new ArrayList(); private final Map headers = new LinkedHashMap(); @@ -104,6 +108,11 @@ class Requester { } } + /** + * If timeout issues let's retry after milliseconds. + */ + private static final int retryTimeoutMillis = 100; + Requester(GitHub root) { this.root = root; } @@ -470,7 +479,8 @@ class Requester { } /** - * As stream input stream. + * Response input stream. There are scenarios where direct stream reading is needed, however it is better to use + * {@link #fetch(Class)} where possible. * * @return the input stream * @throws IOException @@ -491,8 +501,7 @@ class Requester { uc = setupConnection(url); try { - retryInvalidCached404Response(); - return supplier.get(); + return _fetchOrRetry(supplier, CONNECTION_ERROR_RETRIES); } catch (IOException e) { handleApiError(e); } finally { @@ -501,6 +510,86 @@ class Requester { } } + private T _fetchOrRetry(SupplierThrows supplier, int retries) throws IOException { + int responseCode = -1; + String responseMessage = null; + // When retries equal 0 the previous call must return or throw, not retry again + if (retries < 0) { + throw new IllegalArgumentException("'retries' cannot be less than 0"); + } + + try { + // This is where the request is sent and response is processing starts + responseCode = uc.getResponseCode(); + responseMessage = uc.getResponseMessage(); + + // If we are caching and get an invalid cached 404, retry it. + if (!retryInvalidCached404Response(responseCode, retries)) { + return supplier.get(); + } + } catch (FileNotFoundException e) { + // java.net.URLConnection handles 404 exception as FileNotFoundException, + // don't wrap exception in HttpException to preserve backward compatibility + throw e; + } catch (IOException e) { + + if (!retryConnectionError(e, retries)) { + throw new HttpException(responseCode, responseMessage, uc.getURL(), e); + } + } + + // We did not fetch or throw, retry + return _fetchOrRetry(supplier, retries - 1); + + } + + private boolean retryConnectionError(IOException e, int retries) throws IOException { + // There are a range of connection errors where we want to wait a moment and just automatically retry + boolean connectionError = e instanceof SocketException || e instanceof SocketTimeoutException + || e instanceof SSLHandshakeException; + if (connectionError && retries > 0) { + LOGGER.log(INFO, + e.getMessage() + " while connecting to " + uc.getURL() + ". Sleeping " + + Requester.retryTimeoutMillis + " milliseconds before retrying... ; will try " + retries + + " more time(s)"); + try { + Thread.sleep(Requester.retryTimeoutMillis); + } catch (InterruptedException ie) { + throw (IOException) new InterruptedIOException().initCause(e); + } + uc = setupConnection(uc.getURL()); + return true; + } + return false; + } + + private boolean retryInvalidCached404Response(int responseCode, int retries) throws IOException { + // WORKAROUND FOR ISSUE #669: + // When the Requester detects a 404 response with an ETag (only happpens when the server's 304 + // is bogus and would cause cache corruption), try the query again with new request header + // that forces the server to not return 304 and return new data instead. + // + // This solution is transparent to users of this library and automatically handles a + // situation that was cause insidious and hard to debug bad responses in caching + // scenarios. If GitHub ever fixes their issue and/or begins providing accurate ETags to + // their 404 responses, this will result in at worst two requests being made for each 404 + // responses. However, only the second request will count against rate limit. + if (responseCode == 404 && Objects.equals(uc.getRequestMethod(), "GET") && uc.getHeaderField("ETag") != null + && !Objects.equals(uc.getRequestProperty("Cache-Control"), "no-cache") && retries > 0) { + LOGGER.log(FINE, + "Encountered GitHub invalid cached 404 from " + uc.getURL() + + ". Retrying with \"Cache-Control\"=\"no-cache\"..."); + + uc = setupConnection(uc.getURL()); + // Setting "Cache-Control" to "no-cache" stops the cache from supplying + // "If-Modified-Since" or "If-None-Match" values. + // This makes GitHub give us current data (not incorrectly cached data) + uc.setRequestProperty("Cache-Control", "no-cache"); + return true; + } + return false; + } + private T[] concatenatePages(Class type, List pages, int totalLength) { T[] result = type.cast(Array.newInstance(type.getComponentType(), totalLength)); @@ -850,10 +939,8 @@ class Requester { private T parse(Class type, T instance, int timeouts) throws IOException { InputStreamReader r = null; int responseCode = -1; - String responseMessage = null; try { responseCode = uc.getResponseCode(); - responseMessage = uc.getResponseMessage(); if (responseCode == 304) { return null; // special case handling for 304 unmodified, as the content will be "" } @@ -897,44 +984,11 @@ class Requester { return setResponseHeaders(MAPPER.readerForUpdating(instance).readValue(data)); } return null; - } catch (FileNotFoundException e) { - // java.net.URLConnection handles 404 exception as FileNotFoundException, - // don't wrap exception in HttpException to preserve backward compatibility - throw e; - } catch (IOException e) { - if (e instanceof SocketTimeoutException && timeouts > 0) { - LOGGER.log(INFO, "timed out accessing " + uc.getURL() + "; will try " + timeouts + " more time(s)", e); - return parse(type, instance, timeouts - 1); - } - throw new HttpException(responseCode, responseMessage, uc.getURL(), e); } finally { IOUtils.closeQuietly(r); } } - private void retryInvalidCached404Response() throws IOException { - // WORKAROUND FOR ISSUE #669: - // When the Requester detects a 404 response with an ETag (only happpens when the server's 304 - // is bogus and would cause cache corruption), try the query again with new request header - // that forces the server to not return 304 and return new data instead. - // - // This solution is transparent to users of this library and automatically handles a - // situation that was cause insidious and hard to debug bad responses in caching - // scenarios. If GitHub ever fixes their issue and/or begins providing accurate ETags to - // their 404 responses, this will result in at worst two requests being made for each 404 - // responses. However, only the second request will count against rate limit. - int responseCode = uc.getResponseCode(); - if (responseCode == 404 && Objects.equals(uc.getRequestMethod(), "GET") && uc.getHeaderField("ETag") != null - && !Objects.equals(uc.getRequestProperty("Cache-Control"), "no-cache")) { - uc = setupConnection(uc.getURL()); - // Setting "Cache-Control" to "no-cache" stops the cache from supplying - // "If-Modified-Since" or "If-None-Match" values. - // This makes GitHub give us current data (not incorrectly cached data) - uc.setRequestProperty("Cache-Control", "no-cache"); - uc.getResponseCode(); - } - } - private T setResponseHeaders(T readValue) { if (readValue instanceof GHObject[]) { for (GHObject ghObject : (GHObject[]) readValue) { diff --git a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java index 9bafb4d9d..05b8a606a 100644 --- a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java +++ b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java @@ -2,6 +2,9 @@ package org.kohsuke.github; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import org.apache.commons.io.IOUtils; +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.StringDescription; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -13,6 +16,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.util.*; +import static org.hamcrest.Matchers.is; import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; @@ -37,11 +41,7 @@ public abstract class AbstractGitHubWireMockTest extends Assert { */ protected GitHub gitHub; - /** - * {@link GitHub} instance for use before/after test. Traffic will not be part of snapshot when taken. Should only - * be used when isUseProxy() or isTakeSnapShot(). - */ - protected GitHub gitHubBeforeAfter; + private GitHub gitHubBeforeAfter; protected final String baseFilesClassPath = this.getClass().getName().replace('.', '/'); protected final String baseRecordPath = "src/test/resources/" + baseFilesClassPath + "/wiremock"; @@ -126,6 +126,13 @@ public abstract class AbstractGitHubWireMockTest extends Assert { mockGitHub.isUseProxy()); } + protected void verifyAuthenticated(GitHub instance) { + assertThat( + "GitHub connection believes it is anonymous. Make sure you set GITHUB_OAUTH or both GITHUB_USER and GITHUB_PASSWORD environment variables", + instance.isAnonymous(), + is(false)); + } + protected GHUser getUser() { return getUser(gitHub); } @@ -163,9 +170,10 @@ public abstract class AbstractGitHubWireMockTest extends Assert { protected GHRepository getTempRepository(String name) throws IOException { String fullName = GITHUB_API_TEST_ORG + '/' + name; if (mockGitHub.isUseProxy()) { + cleanupRepository(fullName); - GHRepository repository = gitHubBeforeAfter.getOrganization(GITHUB_API_TEST_ORG) + GHRepository repository = getGitHubBeforeAfter().getOrganization(GITHUB_API_TEST_ORG) .createRepository(name) .description("A test repository for testing the github-api project: " + name) .homepage("http://github-api.kohsuke.org/") @@ -199,7 +207,7 @@ public abstract class AbstractGitHubWireMockTest extends Assert { if (mockGitHub.isUseProxy()) { tempGitHubRepositories.add(fullName); try { - GHRepository repository = gitHubBeforeAfter.getRepository(fullName); + GHRepository repository = getGitHubBeforeAfter().getRepository(fullName); if (repository != null) { repository.delete(); } @@ -210,6 +218,17 @@ public abstract class AbstractGitHubWireMockTest extends Assert { } } + /** + * {@link GitHub} instance for use before/after test. Traffic will not be part of snapshot when taken. Should only + * be used when isUseProxy() or isTakeSnapShot(). + * + * @return a github instance after checking Authentication + */ + public GitHub getGitHubBeforeAfter() { + verifyAuthenticated(gitHubBeforeAfter); + return gitHubBeforeAfter; + } + protected void kohsuke() { // No-op for now // Generally this means the test is doing something that requires additional access rights @@ -219,4 +238,28 @@ public abstract class AbstractGitHubWireMockTest extends Assert { // assumeTrue(login.equals("kohsuke") || login.equals("kohsuke2")); } + public static void assertThat(T actual, Matcher matcher) { + assertThat("", actual, matcher); + } + + public static void assertThat(String reason, T actual, Matcher matcher) { + if (!matcher.matches(actual)) { + Description description = new StringDescription(); + description.appendText(reason) + .appendText(System.lineSeparator()) + .appendText("Expected: ") + .appendDescriptionOf(matcher) + .appendText(System.lineSeparator()) + .appendText(" but: "); + matcher.describeMismatch(actual, description); + throw new AssertionError(description.toString()); + } + } + + public static void assertThat(String reason, boolean assertion) { + if (!assertion) { + throw new AssertionError(reason); + } + } + } diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index 7f7929b6c..cb41c73ba 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -3,6 +3,8 @@ package org.kohsuke.github; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.SystemUtils; +import org.junit.Assume; import org.junit.Ignore; import org.junit.Test; import org.kohsuke.github.GHCommit.File; @@ -17,7 +19,6 @@ import java.util.Map.Entry; import java.util.regex.Pattern; import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.hasProperty; /** @@ -67,7 +68,7 @@ public class AppTest extends AbstractGitHubWireMockTest { private void cleanupUserRepository(final String name) throws IOException { if (mockGitHub.isUseProxy()) { - cleanupRepository(getUser(gitHubBeforeAfter).getLogin() + "/" + name); + cleanupRepository(getUser(getGitHubBeforeAfter()).getLogin() + "/" + name); } } @@ -430,7 +431,7 @@ public class AppTest extends AbstractGitHubWireMockTest { // System.out.println(hook); if (mockGitHub.isUseProxy()) { - r = gitHubBeforeAfter.getOrganization(GITHUB_API_TEST_ORG).getRepository("github-api"); + r = getGitHubBeforeAfter().getOrganization(GITHUB_API_TEST_ORG).getRepository("github-api"); for (GHHook h : r.getHooks()) { h.delete(); } @@ -819,7 +820,7 @@ public class AppTest extends AbstractGitHubWireMockTest { void cleanupLabel(String name) { if (mockGitHub.isUseProxy()) { try { - GHLabel t = gitHubBeforeAfter.getRepository("github-api-test-org/test-labels").getLabel("test"); + GHLabel t = getGitHubBeforeAfter().getRepository("github-api-test-org/test-labels").getLabel("test"); t.delete(); } catch (IOException e) { @@ -896,6 +897,8 @@ public class AppTest extends AbstractGitHubWireMockTest { @Test public void blob() throws Exception { + Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + GHRepository r = gitHub.getRepository("github-api/github-api"); String sha1 = "a12243f2fc5b8c2ba47dd677d0b0c7583539584d"; diff --git a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java index 240ae271c..aa75f9113 100644 --- a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java +++ b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java @@ -26,7 +26,7 @@ public class GHContentIntegrationTest extends AbstractGitHubWireMockTest { @After public void cleanup() throws Exception { if (mockGitHub.isUseProxy()) { - repo = gitHubBeforeAfter.getRepository("github-api-test-org/GHContentIntegrationTest"); + repo = getGitHubBeforeAfter().getRepository("github-api-test-org/GHContentIntegrationTest"); try { GHContent content = repo.getFileContent(createdFilename); if (content != null) { diff --git a/src/test/java/org/kohsuke/github/GHDeploymentTest.java b/src/test/java/org/kohsuke/github/GHDeploymentTest.java index b2dc602b1..edc020313 100644 --- a/src/test/java/org/kohsuke/github/GHDeploymentTest.java +++ b/src/test/java/org/kohsuke/github/GHDeploymentTest.java @@ -4,8 +4,6 @@ import org.junit.Test; import java.io.IOException; -import static org.junit.Assert.assertNotNull; - /** * @author Martin van Zijl */ diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java index 09add4d0c..a4360618f 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -5,7 +5,7 @@ import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class GHEventPayloadTest { diff --git a/src/test/java/org/kohsuke/github/GHGistTest.java b/src/test/java/org/kohsuke/github/GHGistTest.java index beae248f2..cbb70d77a 100644 --- a/src/test/java/org/kohsuke/github/GHGistTest.java +++ b/src/test/java/org/kohsuke/github/GHGistTest.java @@ -2,7 +2,6 @@ package org.kohsuke.github; import org.junit.Test; -import static com.github.tomakehurst.wiremock.client.WireMock.*; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.core.Is.is; diff --git a/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java b/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java index 83156723f..9fef615a8 100644 --- a/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java +++ b/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java @@ -7,10 +7,6 @@ import org.junit.Test; import java.io.IOException; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - /** * @author Martin van Zijl */ diff --git a/src/test/java/org/kohsuke/github/GHHookTest.java b/src/test/java/org/kohsuke/github/GHHookTest.java index d52709782..3f3b40cbc 100644 --- a/src/test/java/org/kohsuke/github/GHHookTest.java +++ b/src/test/java/org/kohsuke/github/GHHookTest.java @@ -11,10 +11,10 @@ import java.util.Map; import static java.util.Collections.singletonList; import static java.util.Collections.singletonMap; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.core.IsInstanceOf.instanceOf; -import static org.junit.Assert.assertThat; /** * @author Kanstantsin Shautsou diff --git a/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java b/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java index d8b290cfc..7b28bb700 100644 --- a/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java +++ b/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java @@ -5,6 +5,11 @@ import org.junit.Test; import java.io.IOException; import java.util.List; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import static org.kohsuke.github.GHDirection.DESC; import static org.kohsuke.github.GHMarketplaceAccountType.ORGANIZATION; import static org.kohsuke.github.GHMarketplaceListAccountBuilder.Sort.UPDATED; diff --git a/src/test/java/org/kohsuke/github/GHMilestoneTest.java b/src/test/java/org/kohsuke/github/GHMilestoneTest.java index 10ccc9a1a..4bdb79cdc 100644 --- a/src/test/java/org/kohsuke/github/GHMilestoneTest.java +++ b/src/test/java/org/kohsuke/github/GHMilestoneTest.java @@ -7,6 +7,8 @@ import org.junit.Test; import java.io.IOException; import java.util.Date; +import static org.junit.Assert.assertEquals; + /** * @author Martin van Zijl */ @@ -20,7 +22,7 @@ public class GHMilestoneTest extends AbstractGitHubWireMockTest { return; } - for (GHMilestone milestone : getRepository(gitHubBeforeAfter).listMilestones(GHIssueState.ALL)) { + for (GHMilestone milestone : getRepository(getGitHubBeforeAfter()).listMilestones(GHIssueState.ALL)) { if ("Original Title".equals(milestone.getTitle()) || "Updated Title".equals(milestone.getTitle())) { milestone.delete(); } diff --git a/src/test/java/org/kohsuke/github/GHObjectTest.java b/src/test/java/org/kohsuke/github/GHObjectTest.java index b9a19a5fd..d322d7656 100644 --- a/src/test/java/org/kohsuke/github/GHObjectTest.java +++ b/src/test/java/org/kohsuke/github/GHObjectTest.java @@ -13,4 +13,4 @@ public class GHObjectTest extends org.kohsuke.github.AbstractGitHubWireMockTest containsString( "login=github-api-test-org,location=,blog=,email=,name=,company=,type=Organization,followers=0,following=0")); } -} \ No newline at end of file +} diff --git a/src/test/java/org/kohsuke/github/GHOrganizationTest.java b/src/test/java/org/kohsuke/github/GHOrganizationTest.java index 4782ae994..5c3cf2140 100644 --- a/src/test/java/org/kohsuke/github/GHOrganizationTest.java +++ b/src/test/java/org/kohsuke/github/GHOrganizationTest.java @@ -21,7 +21,7 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest { return; } - GHTeam team = gitHubBeforeAfter.getOrganization(GITHUB_API_TEST_ORG).getTeamByName(TEAM_NAME_CREATE); + GHTeam team = getGitHubBeforeAfter().getOrganization(GITHUB_API_TEST_ORG).getTeamByName(TEAM_NAME_CREATE); if (team != null) { team.delete(); } @@ -86,7 +86,7 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest { // Create team with access to repository. Check access was granted. GHTeam team = org.createTeam(TEAM_NAME_CREATE, GHOrganization.Permission.PUSH, repo); Assert.assertTrue(team.getRepositories().containsKey(REPO_NAME)); - Assert.assertEquals(Permission.PUSH.toString().toLowerCase(), team.getPermission()); + assertEquals(Permission.PUSH.toString().toLowerCase(), team.getPermission()); } @Test @@ -100,6 +100,30 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest { // Create team with no permission field. Verify that default permission is pull GHTeam team = org.createTeam(TEAM_NAME_CREATE, repo); Assert.assertTrue(team.getRepositories().containsKey(REPO_NAME)); - Assert.assertEquals(DEFAULT_PERMISSION, team.getPermission()); + assertEquals(DEFAULT_PERMISSION, team.getPermission()); + } + + @Test + public void testCreateVisibleTeam() throws IOException { + GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG); + + GHTeam team = org.createTeam(TEAM_NAME_CREATE).privacy(GHTeam.Privacy.CLOSED).create(); + assertEquals(GHTeam.Privacy.CLOSED, team.getPrivacy()); + } + + @Test + public void testCreateAllArgsTeam() throws IOException { + String REPO_NAME = "github-api"; + GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG); + + GHTeam team = org.createTeam(TEAM_NAME_CREATE) + .description("Team description") + .maintainers("bitwiseman") + .repositories(REPO_NAME) + .privacy(GHTeam.Privacy.CLOSED) + .parentTeamId(3617900) + .create(); + assertEquals("Team description", team.getDescription()); + assertEquals(GHTeam.Privacy.CLOSED, team.getPrivacy()); } } diff --git a/src/test/java/org/kohsuke/github/GHProjectCardTest.java b/src/test/java/org/kohsuke/github/GHProjectCardTest.java index e6bf0b06b..b2f00e622 100644 --- a/src/test/java/org/kohsuke/github/GHProjectCardTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectCardTest.java @@ -74,7 +74,7 @@ public class GHProjectCardTest extends AbstractGitHubWireMockTest { public void after() throws IOException { if (mockGitHub.isUseProxy()) { if (card != null) { - card = gitHubBeforeAfter.getProjectCard(card.getId()); + card = getGitHubBeforeAfter().getProjectCard(card.getId()); try { card.delete(); card = null; @@ -83,7 +83,7 @@ public class GHProjectCardTest extends AbstractGitHubWireMockTest { } } if (column != null) { - column = gitHubBeforeAfter.getProjectColumn(column.getId()); + column = getGitHubBeforeAfter().getProjectColumn(column.getId()); try { column.delete(); column = null; @@ -92,7 +92,7 @@ public class GHProjectCardTest extends AbstractGitHubWireMockTest { } } if (project != null) { - project = gitHubBeforeAfter.getProject(project.getId()); + project = getGitHubBeforeAfter().getProject(project.getId()); try { project.delete(); project = null; diff --git a/src/test/java/org/kohsuke/github/GHProjectColumnTest.java b/src/test/java/org/kohsuke/github/GHProjectColumnTest.java index 29c7e0fd8..0973eeb32 100644 --- a/src/test/java/org/kohsuke/github/GHProjectColumnTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectColumnTest.java @@ -48,7 +48,7 @@ public class GHProjectColumnTest extends AbstractGitHubWireMockTest { public void after() throws IOException { if (mockGitHub.isUseProxy()) { if (column != null) { - column = gitHubBeforeAfter.getProjectColumn(column.getId()); + column = getGitHubBeforeAfter().getProjectColumn(column.getId()); try { column.delete(); column = null; @@ -57,7 +57,7 @@ public class GHProjectColumnTest extends AbstractGitHubWireMockTest { } } if (project != null) { - project = gitHubBeforeAfter.getProject(project.getId()); + project = getGitHubBeforeAfter().getProject(project.getId()); try { project.delete(); project = null; diff --git a/src/test/java/org/kohsuke/github/GHProjectTest.java b/src/test/java/org/kohsuke/github/GHProjectTest.java index 178a1d2b5..cc10b1fb8 100644 --- a/src/test/java/org/kohsuke/github/GHProjectTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectTest.java @@ -69,7 +69,7 @@ public class GHProjectTest extends AbstractGitHubWireMockTest { public void after() throws IOException { if (mockGitHub.isUseProxy()) { if (project != null) { - project = gitHubBeforeAfter.getProject(project.getId()); + project = getGitHubBeforeAfter().getProject(project.getId()); try { project.delete(); project = null; diff --git a/src/test/java/org/kohsuke/github/GHPullRequestTest.java b/src/test/java/org/kohsuke/github/GHPullRequestTest.java index 4ee175090..dfeb16484 100644 --- a/src/test/java/org/kohsuke/github/GHPullRequestTest.java +++ b/src/test/java/org/kohsuke/github/GHPullRequestTest.java @@ -24,7 +24,7 @@ public class GHPullRequestTest extends AbstractGitHubWireMockTest { return; } - for (GHPullRequest pr : getRepository(this.gitHubBeforeAfter).getPullRequests(GHIssueState.OPEN)) { + for (GHPullRequest pr : getRepository(this.getGitHubBeforeAfter()).getPullRequests(GHIssueState.OPEN)) { pr.close(); } } diff --git a/src/test/java/org/kohsuke/github/GHRateLimitTest.java b/src/test/java/org/kohsuke/github/GHRateLimitTest.java index 3b6bf731b..c68e57460 100644 --- a/src/test/java/org/kohsuke/github/GHRateLimitTest.java +++ b/src/test/java/org/kohsuke/github/GHRateLimitTest.java @@ -12,6 +12,7 @@ import java.util.Date; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.Matchers.greaterThanOrEqualTo; +import static org.hamcrest.core.IsInstanceOf.instanceOf; /** * Test showing the behavior of OkHttpConnector with and without cache. diff --git a/src/test/java/org/kohsuke/github/GHTagTest.java b/src/test/java/org/kohsuke/github/GHTagTest.java index 186740b6a..5aac4d083 100644 --- a/src/test/java/org/kohsuke/github/GHTagTest.java +++ b/src/test/java/org/kohsuke/github/GHTagTest.java @@ -24,7 +24,7 @@ public class GHTagTest extends AbstractGitHubWireMockTest { } try { - GHRef ref = getRepository(this.gitHubBeforeAfter).getRef("tags/create_tag_test"); + GHRef ref = getRepository(this.getGitHubBeforeAfter()).getRef("tags/create_tag_test"); if (ref != null) { ref.delete(); } diff --git a/src/test/java/org/kohsuke/github/GHTeamTest.java b/src/test/java/org/kohsuke/github/GHTeamTest.java index 742d89a3b..1d369acfd 100644 --- a/src/test/java/org/kohsuke/github/GHTeamTest.java +++ b/src/test/java/org/kohsuke/github/GHTeamTest.java @@ -1,9 +1,12 @@ package org.kohsuke.github; import org.junit.Test; +import org.kohsuke.github.GHTeam.Privacy; import java.io.IOException; +import static org.junit.Assert.assertEquals; + public class GHTeamTest extends AbstractGitHubWireMockTest { @Test @@ -30,4 +33,27 @@ public class GHTeamTest extends AbstractGitHubWireMockTest { assertEquals(description, team.getDescription()); } + @Test + public void testSetPrivacy() throws IOException { + String teamSlug = "dummy-team"; + Privacy privacy = Privacy.CLOSED; + + // Set the privacy. + GHTeam team = gitHub.getOrganization(GITHUB_API_TEST_ORG).getTeamBySlug(teamSlug); + team.setPrivacy(privacy); + + // Check that it was set correctly. + team = gitHub.getOrganization(GITHUB_API_TEST_ORG).getTeamBySlug(teamSlug); + assertEquals(privacy, team.getPrivacy()); + + privacy = Privacy.SECRET; + + // Set the privacy. + team.setPrivacy(privacy); + + // Check that it was set correctly. + team = gitHub.getOrganization(GITHUB_API_TEST_ORG).getTeamBySlug(teamSlug); + assertEquals(privacy, team.getPrivacy()); + } + } diff --git a/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java b/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java index 7b091cfb4..b2bb175dc 100644 --- a/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java +++ b/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java @@ -8,6 +8,8 @@ import org.junit.Test; import java.io.IOException; import java.util.Arrays; +import static org.junit.Assert.assertEquals; + public class GHTreeBuilderTest extends AbstractGitHubWireMockTest { private static String REPO_NAME = "github-api-test-org/GHTreeBuilderTest"; @@ -31,7 +33,7 @@ public class GHTreeBuilderTest extends AbstractGitHubWireMockTest { @After public void cleanup() throws Exception { if (mockGitHub.isUseProxy()) { - repo = gitHubBeforeAfter.getRepository(REPO_NAME); + repo = getGitHubBeforeAfter().getRepository(REPO_NAME); Arrays.asList(PATH_SCRIPT, PATH_README, PATH_DATA1, PATH_DATA2).forEach(path -> { try { GHContent content = repo.getFileContent(path); diff --git a/src/test/java/org/kohsuke/github/GHUserTest.java b/src/test/java/org/kohsuke/github/GHUserTest.java index e40db4ad2..4acd3fcc4 100644 --- a/src/test/java/org/kohsuke/github/GHUserTest.java +++ b/src/test/java/org/kohsuke/github/GHUserTest.java @@ -6,6 +6,11 @@ import java.io.IOException; import java.util.*; import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; public class GHUserTest extends AbstractGitHubWireMockTest { @Test diff --git a/src/test/java/org/kohsuke/github/GitHubConnectionTest.java b/src/test/java/org/kohsuke/github/GitHubConnectionTest.java index 5e244da3b..03806cbbe 100644 --- a/src/test/java/org/kohsuke/github/GitHubConnectionTest.java +++ b/src/test/java/org/kohsuke/github/GitHubConnectionTest.java @@ -1,5 +1,6 @@ package org.kohsuke.github; +import org.junit.Ignore; import org.junit.Test; import java.io.IOException; @@ -99,10 +100,11 @@ public class GitHubConnectionTest extends AbstractGitHubWireMockTest { assertEquals("", github.login); } + @Ignore @Test public void testGitHubIsApiUrlValid() throws IOException { GitHub hub = GitHub.connectAnonymously(); - // GitHub github = GitHub.connectToEnterpriseAnonymously("https://github.mycompany.com/api/v3/"); + // GitHub hub = GitHub.connectToEnterpriseAnonymously(mockGitHub.apiServer().baseUrl()); try { hub.checkApiUrlValidity(); } catch (IOException ioe) { diff --git a/src/test/java/org/kohsuke/github/GitHubStaticTest.java b/src/test/java/org/kohsuke/github/GitHubStaticTest.java index 8066dd9f1..89c95c333 100644 --- a/src/test/java/org/kohsuke/github/GitHubStaticTest.java +++ b/src/test/java/org/kohsuke/github/GitHubStaticTest.java @@ -1,6 +1,5 @@ package org.kohsuke.github; -import org.junit.Assert; import org.junit.Test; import java.text.SimpleDateFormat; @@ -18,7 +17,7 @@ import static org.hamcrest.core.Is.is; * * @author Liam Newman */ -public class GitHubStaticTest extends Assert { +public class GitHubStaticTest extends AbstractGitHubWireMockTest { @Test public void timeRoundTrip() throws Exception { diff --git a/src/test/java/org/kohsuke/github/Github2faTest.java b/src/test/java/org/kohsuke/github/Github2faTest.java index fb3c9cb6b..6b77b1297 100644 --- a/src/test/java/org/kohsuke/github/Github2faTest.java +++ b/src/test/java/org/kohsuke/github/Github2faTest.java @@ -6,6 +6,9 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + /** * @author Kevin Harrington mad.hephaestus@gmail.com */ diff --git a/src/test/java/org/kohsuke/github/LifecycleTest.java b/src/test/java/org/kohsuke/github/LifecycleTest.java index 1a467c7a3..6cad87671 100644 --- a/src/test/java/org/kohsuke/github/LifecycleTest.java +++ b/src/test/java/org/kohsuke/github/LifecycleTest.java @@ -1,5 +1,7 @@ package org.kohsuke.github; +import org.apache.commons.lang3.SystemUtils; +import org.junit.Assume; import org.junit.Test; import java.io.File; @@ -14,6 +16,8 @@ import static org.hamcrest.core.Is.is; public class LifecycleTest extends AbstractGitHubWireMockTest { @Test public void testCreateRepository() throws IOException { + Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + GHMyself myself = gitHub.getMyself(); // GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG); diff --git a/src/test/java/org/kohsuke/github/RequesterRetryTest.java b/src/test/java/org/kohsuke/github/RequesterRetryTest.java new file mode 100644 index 000000000..143d44899 --- /dev/null +++ b/src/test/java/org/kohsuke/github/RequesterRetryTest.java @@ -0,0 +1,731 @@ +package org.kohsuke.github; + +import com.github.tomakehurst.wiremock.http.Fault; +import com.github.tomakehurst.wiremock.stubbing.Scenario; +import org.junit.Before; +import org.junit.Test; +import org.kohsuke.github.extras.ImpatientHttpConnector; +import org.mockito.Mockito; + +import java.io.ByteArrayOutputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.ProtocolException; +import java.net.SocketException; +import java.net.SocketTimeoutException; +import java.net.URL; +import java.security.Permission; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; +import java.util.logging.StreamHandler; + +import javax.net.ssl.SSLHandshakeException; + +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static org.hamcrest.Matchers.*; + +/** + * @author Victor Martinez + */ +public class RequesterRetryTest extends AbstractGitHubWireMockTest { + + private static Logger log = Logger.getLogger(Requester.class.getName()); // matches the logger in the affected class + private static OutputStream logCapturingStream; + private static StreamHandler customLogHandler; + HttpURLConnection connection; + int baseRequestCount; + + public RequesterRetryTest() { + useDefaultGitHub = false; + } + + protected GHRepository getRepository() throws IOException { + return getRepository(gitHub); + } + + private GHRepository getRepository(GitHub gitHub) throws IOException { + return gitHub.getOrganization("github-api-test-org").getRepository("github-api"); + } + + @Before + public void attachLogCapturer() { + logCapturingStream = new ByteArrayOutputStream(); + customLogHandler = new StreamHandler(logCapturingStream, new SimpleFormatter()); + log.addHandler(customLogHandler); + } + + public String getTestCapturedLog() throws IOException { + customLogHandler.flush(); + return logCapturingStream.toString(); + } + + public void resetTestCapturedLog() throws IOException { + log.removeHandler(customLogHandler); + customLogHandler.close(); + attachLogCapturer(); + } + + // Issue #539 + @Test + public void testSocketConnectionAndRetry() throws Exception { + // CONNECTION_RESET_BY_PEER errors result in two requests each + // to get this failure for "3" tries we have to do 6 queries. + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")) + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))); + + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build(); + + GHRepository repo = getRepository(); + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + repo.getBranch("test/timeout"); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(HttpException.class)); + } + + String capturedLog = getTestCapturedLog(); + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 6)); + } + + // Issue #539 + @Test + public void testSocketConnectionAndRetry_StatusCode() throws Exception { + // CONNECTION_RESET_BY_PEER errors result in two requests each + // to get this failure for "3" tries we have to do 6 queries. + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")) + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))); + + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build(); + + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + // status code is a different code path that should also be covered by this. + gitHub.createRequest() + .withUrlPath("/repos/github-api-test-org/github-api/branches/test/timeout") + .fetchHttpStatusCode(); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(HttpException.class)); + } + + String capturedLog = getTestCapturedLog(); + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 6)); + } + + @Test + public void testSocketConnectionAndRetry_Success() throws Exception { + // CONNECTION_RESET_BY_PEER errors result in two requests each + // to get this failure for "3" tries we have to do 6 queries. + // If there are only 5 errors we succeed. + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")).atPriority(0) + .inScenario("Retry") + .whenScenarioStateIs(Scenario.STARTED) + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))) + .setNewScenarioState("Retry-1"); + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")).atPriority(0) + .inScenario("Retry") + .whenScenarioStateIs("Retry-1") + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))) + .setNewScenarioState("Retry-2"); + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")).atPriority(0) + .inScenario("Retry") + .whenScenarioStateIs("Retry-2") + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))) + .setNewScenarioState("Retry-3"); + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")).atPriority(0) + .inScenario("Retry") + .whenScenarioStateIs("Retry-3") + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))) + .setNewScenarioState("Retry-4"); + this.mockGitHub.apiServer() + .stubFor(get(urlMatching(".+/branches/test/timeout")).atPriority(0) + .atPriority(0) + .inScenario("Retry") + .whenScenarioStateIs("Retry-4") + .willReturn(aResponse().withFault(Fault.CONNECTION_RESET_BY_PEER))) + .setNewScenarioState("Retry-5"); + + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build(); + + GHRepository repo = getRepository(); + baseRequestCount = this.mockGitHub.getRequestCount(); + GHBranch branch = repo.getBranch("test/timeout"); + assertThat(branch, notNullValue()); + String capturedLog = getTestCapturedLog(); + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 6)); + } + + @Test + public void testResponseCodeFailureExceptions() throws Exception { + // No retry for these Exceptions + HttpConnector connector = new ResponseCodeThrowingHttpConnector<>(() -> { + throw new IOException("Custom"); + }); + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withConnector(connector) + .build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + this.gitHub.getOrganization(GITHUB_API_TEST_ORG); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(HttpException.class)); + assertThat(e.getCause(), instanceOf(IOException.class)); + assertThat(e.getCause().getMessage(), is("Custom")); + String capturedLog = getTestCapturedLog(); + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + + connector = new ResponseCodeThrowingHttpConnector<>(() -> { + throw new FileNotFoundException("Custom"); + }); + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withConnector(connector) + .build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + this.gitHub.getOrganization(GITHUB_API_TEST_ORG); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(FileNotFoundException.class)); + assertThat(e.getMessage(), is("Custom")); + String capturedLog = getTestCapturedLog(); + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + } + + @Test + public void testInputStreamFailureExceptions() throws Exception { + // No retry for these Exceptions + HttpConnector connector = new InputStreamThrowingHttpConnector<>(() -> { + throw new IOException("Custom"); + }); + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withConnector(connector) + .build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + this.gitHub.getOrganization(GITHUB_API_TEST_ORG); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(HttpException.class)); + assertThat(e.getCause(), instanceOf(IOException.class)); + assertThat(e.getCause().getMessage(), is("Custom")); + String capturedLog = getTestCapturedLog(); + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + + // FileNotFound doesn't need a special connector + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + try { + this.gitHub.getOrganization(GITHUB_API_TEST_ORG + "-missing"); + fail(); + } catch (Exception e) { + assertThat(e, instanceOf(GHFileNotFoundException.class)); + assertThat(e.getCause(), instanceOf(FileNotFoundException.class)); + assertThat(e.getCause().getMessage(), containsString("github-api-test-org-missing")); + String capturedLog = getTestCapturedLog(); + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + + // FileNotFound doesn't need a special connector + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()).build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + assertThat( + this.gitHub.createRequest() + .withUrlPath("/orgs/" + GITHUB_API_TEST_ORG + "-missing") + .fetchHttpStatusCode(), + equalTo(404)); + String capturedLog = getTestCapturedLog(); + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + + @Test + public void testResponseCodeConnectionExceptions() throws Exception { + // Because the test throws at the very start of getResponseCode, there is only one connection for 3 retries + HttpConnector connector = new ResponseCodeThrowingHttpConnector<>(() -> { + throw new SocketException(); + }); + runConnectionExceptionTest(connector, 1); + runConnectionExceptionStatusCodeTest(connector, 1); + + connector = new ResponseCodeThrowingHttpConnector<>(() -> { + throw new SocketTimeoutException(); + }); + runConnectionExceptionTest(connector, 1); + runConnectionExceptionStatusCodeTest(connector, 1); + + connector = new ResponseCodeThrowingHttpConnector<>(() -> { + throw new SSLHandshakeException("TestFailure"); + }); + runConnectionExceptionTest(connector, 1); + runConnectionExceptionStatusCodeTest(connector, 1); + } + + @Test + public void testResponseMessageConnectionExceptions() throws Exception { + // Because the test throws after getResponseCode, there is one connection for each retry + HttpConnector connector = new ResponseMessageThrowingHttpConnector<>(() -> { + throw new SocketException(); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 3); + + connector = new ResponseMessageThrowingHttpConnector<>(() -> { + throw new SocketTimeoutException(); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 3); + + connector = new ResponseMessageThrowingHttpConnector<>(() -> { + throw new SSLHandshakeException("TestFailure"); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 3); + } + + @Test + public void testInputStreamConnectionExceptions() throws Exception { + // InputStream is where most exceptions get thrown whether connection or simple FNF + // Because the test throws after getResponseCode, there is one connection for each retry + // However, getStatusCode never calls that and so it does succeeds + HttpConnector connector = new InputStreamThrowingHttpConnector<>(() -> { + throw new SocketException(); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 0); + + connector = new InputStreamThrowingHttpConnector<>(() -> { + throw new SocketTimeoutException(); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 0); + + connector = new InputStreamThrowingHttpConnector<>(() -> { + throw new SSLHandshakeException("TestFailure"); + }); + runConnectionExceptionTest(connector, 3); + runConnectionExceptionStatusCodeTest(connector, 0); + } + + private void runConnectionExceptionTest(HttpConnector connector, int expectedRequestCount) throws IOException { + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withConnector(connector) + .build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + assertThat(this.gitHub.getOrganization(GITHUB_API_TEST_ORG), is(notNullValue())); + String capturedLog = getTestCapturedLog(); + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + expectedRequestCount)); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + this.gitHub.createRequest().withUrlPath("/orgs/" + GITHUB_API_TEST_ORG).send(); + capturedLog = getTestCapturedLog(); + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + expectedRequestCount)); + } + + private void runConnectionExceptionStatusCodeTest(HttpConnector connector, int expectedRequestCount) + throws IOException { + // now wire in the connector + this.gitHub = getGitHubBuilder().withEndpoint(mockGitHub.apiServer().baseUrl()) + .withConnector(connector) + .build(); + + resetTestCapturedLog(); + baseRequestCount = this.mockGitHub.getRequestCount(); + assertThat(this.gitHub.createRequest().withUrlPath("/orgs/" + GITHUB_API_TEST_ORG).fetchHttpStatusCode(), + equalTo(200)); + String capturedLog = getTestCapturedLog(); + if (expectedRequestCount > 0) { + assertTrue(capturedLog.contains("will try 2 more time")); + assertTrue(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + expectedRequestCount)); + } else { + // Success without retries + assertFalse(capturedLog.contains("will try 2 more time")); + assertFalse(capturedLog.contains("will try 1 more time")); + assertThat(this.mockGitHub.getRequestCount(), equalTo(baseRequestCount + 1)); + } + } + + class ResponseCodeThrowingHttpConnector extends ImpatientHttpConnector { + + ResponseCodeThrowingHttpConnector(final Thrower thrower) { + super(new HttpConnector() { + final int[] count = { 0 }; + + @Override + public HttpURLConnection connect(URL url) throws IOException { + if (url.toString().contains(GITHUB_API_TEST_ORG)) { + count[0]++; + } + connection = Mockito.spy(new HttpURLConnectionWrapper(url) { + @Override + public int getResponseCode() throws IOException { + // While this is not the way this would go in the real world, it is a fine test + // to show that exception handling and retries are working as expected + if (getURL().toString().contains(GITHUB_API_TEST_ORG)) { + if (count[0] % 3 != 0) { + thrower.throwError(); + } + } + return super.getResponseCode(); + } + }); + + return connection; + } + }); + } + + } + + class ResponseMessageThrowingHttpConnector extends ImpatientHttpConnector { + + ResponseMessageThrowingHttpConnector(final Thrower thrower) { + super(new HttpConnector() { + final int[] count = { 0 }; + + @Override + public HttpURLConnection connect(URL url) throws IOException { + if (url.toString().contains(GITHUB_API_TEST_ORG)) { + count[0]++; + } + connection = Mockito.spy(new HttpURLConnectionWrapper(url) { + @Override + public String getResponseMessage() throws IOException { + // getResponseMessage throwing even though getResponseCode doesn't. + // While this is not the way this would go in the real world, it is a fine test + // to show that exception handling and retries are working as expected + if (getURL().toString().contains(GITHUB_API_TEST_ORG)) { + if (count[0] % 3 != 0) { + thrower.throwError(); + } + } + return super.getResponseMessage(); + } + }); + + return connection; + } + }); + } + } + + class InputStreamThrowingHttpConnector extends ImpatientHttpConnector { + + InputStreamThrowingHttpConnector(final Thrower thrower) { + super(new HttpConnector() { + final int[] count = { 0 }; + + @Override + public HttpURLConnection connect(URL url) throws IOException { + if (url.toString().contains(GITHUB_API_TEST_ORG)) { + count[0]++; + } + connection = Mockito.spy(new HttpURLConnectionWrapper(url) { + @Override + public InputStream getInputStream() throws IOException { + // getResponseMessage throwing even though getResponseCode doesn't. + // While this is not the way this would go in the real world, it is a fine test + // to show that exception handling and retries are working as expected + if (getURL().toString().contains(GITHUB_API_TEST_ORG)) { + if (count[0] % 3 != 0) { + thrower.throwError(); + } + } + return super.getInputStream(); + } + }); + + return connection; + } + }); + } + } + + @FunctionalInterface + public interface Thrower { + void throwError() throws E; + } + + /** + * This is not great but it get the job done. Tried to do a spy of HttpURLConnection but it wouldn't work right. + * Trying to stub methods caused the spy to say it was already connected. + */ + static class HttpURLConnectionWrapper extends HttpURLConnection { + + protected final HttpURLConnection httpURLConnection; + + HttpURLConnectionWrapper(URL url) throws IOException { + super(new URL("http://nonexistant")); + httpURLConnection = (HttpURLConnection) url.openConnection(); + } + + public void connect() throws IOException { + httpURLConnection.connect(); + } + + public void setConnectTimeout(int timeout) { + httpURLConnection.setConnectTimeout(timeout); + } + + public int getConnectTimeout() { + return httpURLConnection.getConnectTimeout(); + } + + public void setReadTimeout(int timeout) { + httpURLConnection.setReadTimeout(timeout); + } + + public int getReadTimeout() { + return httpURLConnection.getReadTimeout(); + } + + public URL getURL() { + return httpURLConnection.getURL(); + } + + public int getContentLength() { + return httpURLConnection.getContentLength(); + } + + public long getContentLengthLong() { + return httpURLConnection.getContentLengthLong(); + } + + public String getContentType() { + return httpURLConnection.getContentType(); + } + + public String getContentEncoding() { + return httpURLConnection.getContentEncoding(); + } + + public long getExpiration() { + return httpURLConnection.getExpiration(); + } + + public long getDate() { + return httpURLConnection.getDate(); + } + + public long getLastModified() { + return httpURLConnection.getLastModified(); + } + + public String getHeaderField(String name) { + return httpURLConnection.getHeaderField(name); + } + + public Map> getHeaderFields() { + return httpURLConnection.getHeaderFields(); + } + + public int getHeaderFieldInt(String name, int Default) { + return httpURLConnection.getHeaderFieldInt(name, Default); + } + + public long getHeaderFieldLong(String name, long Default) { + return httpURLConnection.getHeaderFieldLong(name, Default); + } + + public Object getContent() throws IOException { + return httpURLConnection.getContent(); + } + + @Override + public Object getContent(Class[] classes) throws IOException { + return httpURLConnection.getContent(classes); + } + + public InputStream getInputStream() throws IOException { + return httpURLConnection.getInputStream(); + } + + public OutputStream getOutputStream() throws IOException { + return httpURLConnection.getOutputStream(); + } + + public String toString() { + return httpURLConnection.toString(); + } + + public void setDoInput(boolean doinput) { + httpURLConnection.setDoInput(doinput); + } + + public boolean getDoInput() { + return httpURLConnection.getDoInput(); + } + + public void setDoOutput(boolean dooutput) { + httpURLConnection.setDoOutput(dooutput); + } + + public boolean getDoOutput() { + return httpURLConnection.getDoOutput(); + } + + public void setAllowUserInteraction(boolean allowuserinteraction) { + httpURLConnection.setAllowUserInteraction(allowuserinteraction); + } + + public boolean getAllowUserInteraction() { + return httpURLConnection.getAllowUserInteraction(); + } + + public void setUseCaches(boolean usecaches) { + httpURLConnection.setUseCaches(usecaches); + } + + public boolean getUseCaches() { + return httpURLConnection.getUseCaches(); + } + + public void setIfModifiedSince(long ifmodifiedsince) { + httpURLConnection.setIfModifiedSince(ifmodifiedsince); + } + + public long getIfModifiedSince() { + return httpURLConnection.getIfModifiedSince(); + } + + public boolean getDefaultUseCaches() { + return httpURLConnection.getDefaultUseCaches(); + } + + public void setDefaultUseCaches(boolean defaultusecaches) { + httpURLConnection.setDefaultUseCaches(defaultusecaches); + } + + public void setRequestProperty(String key, String value) { + httpURLConnection.setRequestProperty(key, value); + } + + public void addRequestProperty(String key, String value) { + httpURLConnection.addRequestProperty(key, value); + } + + public String getRequestProperty(String key) { + return httpURLConnection.getRequestProperty(key); + } + + public Map> getRequestProperties() { + return httpURLConnection.getRequestProperties(); + } + + public String getHeaderFieldKey(int n) { + return httpURLConnection.getHeaderFieldKey(n); + } + + public void setFixedLengthStreamingMode(int contentLength) { + httpURLConnection.setFixedLengthStreamingMode(contentLength); + } + + public void setFixedLengthStreamingMode(long contentLength) { + httpURLConnection.setFixedLengthStreamingMode(contentLength); + } + + public void setChunkedStreamingMode(int chunklen) { + httpURLConnection.setChunkedStreamingMode(chunklen); + } + + public String getHeaderField(int n) { + return httpURLConnection.getHeaderField(n); + } + + public void setInstanceFollowRedirects(boolean followRedirects) { + httpURLConnection.setInstanceFollowRedirects(followRedirects); + } + + public boolean getInstanceFollowRedirects() { + return httpURLConnection.getInstanceFollowRedirects(); + } + + public void setRequestMethod(String method) throws ProtocolException { + httpURLConnection.setRequestMethod(method); + } + + public String getRequestMethod() { + return httpURLConnection.getRequestMethod(); + } + + public int getResponseCode() throws IOException { + return httpURLConnection.getResponseCode(); + } + + public String getResponseMessage() throws IOException { + return httpURLConnection.getResponseMessage(); + } + + public long getHeaderFieldDate(String name, long Default) { + return httpURLConnection.getHeaderFieldDate(name, Default); + } + + public void disconnect() { + httpURLConnection.disconnect(); + } + + public boolean usingProxy() { + return httpURLConnection.usingProxy(); + } + + public Permission getPermission() throws IOException { + return httpURLConnection.getPermission(); + } + + public InputStream getErrorStream() { + return httpURLConnection.getErrorStream(); + } + } + +} diff --git a/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java b/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java index 843becc14..680873889 100644 --- a/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java +++ b/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java @@ -22,10 +22,7 @@ public class WireMockStatusReporterTest extends AbstractGitHubWireMockTest { snapshotNotAllowed(); requireProxy("Tests proper configuration when proxying."); - assertThat( - "GitHub connection believes it is anonymous. Make sure you set GITHUB_OAUTH or both GITHUB_USER and GITHUB_PASSWORD environment variables", - gitHub.isAnonymous(), - is(false)); + verifyAuthenticated(gitHub); assertThat(gitHub.login, not(equalTo(STUBBED_USER_LOGIN))); @@ -47,7 +44,7 @@ public class WireMockStatusReporterTest extends AbstractGitHubWireMockTest { assumeFalse("Test only valid when not proxying", mockGitHub.isUseProxy()); - assertThat(gitHub.isAnonymous(), is(false)); + verifyAuthenticated(gitHub); assertThat(gitHub.login, equalTo(STUBBED_USER_LOGIN)); GHUser user = gitHub.getMyself(); diff --git a/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java b/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java index b83b5f649..35007b9bf 100644 --- a/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java +++ b/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java @@ -6,6 +6,8 @@ import com.squareup.okhttp.Cache; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.OkUrlFactory; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.SystemUtils; +import org.junit.Assume; import org.junit.Before; import org.junit.Test; import org.kohsuke.github.AbstractGitHubWireMockTest; @@ -19,6 +21,8 @@ import org.kohsuke.github.GitHub; import java.io.File; import java.io.IOException; +import static org.junit.Assert.fail; + /** * Test showing the behavior of OkHttpConnector cache with GitHub 404 responses. * @@ -41,11 +45,11 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest { @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { - for (GHPullRequest pr : getRepository(this.gitHubBeforeAfter).getPullRequests(GHIssueState.OPEN)) { + for (GHPullRequest pr : getRepository(this.getGitHubBeforeAfter()).getPullRequests(GHIssueState.OPEN)) { pr.close(); } try { - GHRef ref = getRepository(this.gitHubBeforeAfter).getRef(testRefName); + GHRef ref = getRepository(this.getGitHubBeforeAfter()).getRef(testRefName); ref.delete(); } catch (IOException e) { } @@ -53,7 +57,9 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest { } @Test - public void OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error() throws Exception { + public void testCached404() throws Exception { + Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + // ISSUE #669 snapshotNotAllowed(); diff --git a/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java b/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java index 00f85bdfd..2f940b543 100644 --- a/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java @@ -14,6 +14,7 @@ import org.kohsuke.github.*; import java.io.File; import java.io.IOException; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; import static org.hamcrest.core.Is.is; import static org.junit.Assume.assumeFalse; @@ -74,7 +75,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { - GHRepository repo = getRepository(gitHubBeforeAfter); + GHRepository repo = getRepository(getGitHubBeforeAfter()); repo.setDescription("Resetting"); // Let things settle a bit between tests when working against the live site @@ -253,7 +254,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { // Get Tricky - make a change via a different client if (mockGitHub.isUseProxy()) { - GHRepository altRepo = getRepository(gitHubBeforeAfter); + GHRepository altRepo = getRepository(getGitHubBeforeAfter()); altRepo.setDescription("Tricky"); } diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java index 23214137c..8467e30a0 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java @@ -5,6 +5,8 @@ import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemp import okhttp3.Cache; import okhttp3.OkHttpClient; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.SystemUtils; +import org.junit.Assume; import org.junit.Before; import org.junit.Test; import org.kohsuke.github.AbstractGitHubWireMockTest; @@ -18,6 +20,8 @@ import org.kohsuke.github.GitHub; import java.io.File; import java.io.IOException; +import static org.junit.Assert.fail; + /** * Test showing the behavior of OkHttpConnector cache with GitHub 404 responses. * @@ -42,11 +46,11 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest { @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { - for (GHPullRequest pr : getRepository(this.gitHubBeforeAfter).getPullRequests(GHIssueState.OPEN)) { + for (GHPullRequest pr : getRepository(this.getGitHubBeforeAfter()).getPullRequests(GHIssueState.OPEN)) { pr.close(); } try { - GHRef ref = getRepository(this.gitHubBeforeAfter).getRef(testRefName); + GHRef ref = getRepository(this.getGitHubBeforeAfter()).getRef(testRefName); ref.delete(); } catch (IOException e) { } @@ -54,7 +58,9 @@ public class GitHubCachingTest extends AbstractGitHubWireMockTest { } @Test - public void OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error() throws Exception { + public void testCached404() throws Exception { + Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); + // ISSUE #669 snapshotNotAllowed(); diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java index a60221f8d..dea66e4b8 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java @@ -16,6 +16,7 @@ import org.kohsuke.github.GitHub; import java.io.File; import java.io.IOException; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; @@ -79,7 +80,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { - GHRepository repo = getRepository(gitHubBeforeAfter); + GHRepository repo = getRepository(getGitHubBeforeAfter()); repo.setDescription("Resetting"); // Let things settle a bit between tests when working against the live site @@ -261,7 +262,7 @@ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { // Get Tricky - make a change via a different client if (mockGitHub.isUseProxy()) { - GHRepository altRepo = getRepository(gitHubBeforeAfter); + GHRepository altRepo = getRepository(getGitHubBeforeAfter()); altRepo.setDescription("Tricky"); } diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-39714670-728d-4f72-bf18-7b2e6f0ac276.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-39714670.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-39714670-728d-4f72-bf18-7b2e6f0ac276.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-39714670.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-6cc04a40-acd6-409b-b004-671cbc0c03c8.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-6cc04a40.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-6cc04a40-acd6-409b-b004-671cbc0c03c8.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-6cc04a40.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b0c1117a-926e-4ccd-baf3-c7813a465a7a.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b0c1117a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b0c1117a-926e-4ccd-baf3-c7813a465a7a.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b0c1117a.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b1b91949-0448-415c-998e-a38135c37661.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b1b91949.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b1b91949-0448-415c-998e-a38135c37661.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename-b1b91949.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename2-c1bd7f2a-cab0-4208-b4c8-f2a24bca9169.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename2-c1bd7f2a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename2-c1bd7f2a-cab0-4208-b4c8-f2a24bca9169.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/__files/repos_bitwiseman_github-api-test-rename2-c1bd7f2a.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-2-b1b919.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-2-b1b919.json index 7f6b77c2b..081c7f83a 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-2-b1b919.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-2-b1b919.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_bitwiseman_github-api-test-rename-b1b91949-0448-415c-998e-a38135c37661.json", + "bodyFileName": "repos_bitwiseman_github-api-test-rename-b1b91949.json", "headers": { "Date": "Wed, 02 Oct 2019 21:40:01 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-3-397146.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-3-397146.json index 5b73196a3..84a34ccb6 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-3-397146.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-3-397146.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_bitwiseman_github-api-test-rename-39714670-728d-4f72-bf18-7b2e6f0ac276.json", + "bodyFileName": "repos_bitwiseman_github-api-test-rename-39714670.json", "headers": { "Date": "Wed, 02 Oct 2019 21:40:02 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-4-b0c111.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-4-b0c111.json index 89ad724ba..50f6bb97c 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-4-b0c111.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-4-b0c111.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_bitwiseman_github-api-test-rename-b0c1117a-926e-4ccd-baf3-c7813a465a7a.json", + "bodyFileName": "repos_bitwiseman_github-api-test-rename-b0c1117a.json", "headers": { "Date": "Wed, 02 Oct 2019 21:40:02 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-5-6cc04a.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-5-6cc04a.json index 4149f5105..3ce1e312f 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-5-6cc04a.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename-5-6cc04a.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_bitwiseman_github-api-test-rename-6cc04a40-acd6-409b-b004-671cbc0c03c8.json", + "bodyFileName": "repos_bitwiseman_github-api-test-rename-6cc04a40.json", "headers": { "Date": "Wed, 02 Oct 2019 21:40:02 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename2-7-c1bd7f.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename2-7-c1bd7f.json index f56e1468b..2dc93d1fd 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename2-7-c1bd7f.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testRepoCRUD/mappings/repos_bitwiseman_github-api-test-rename2-7-c1bd7f.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_bitwiseman_github-api-test-rename2-c1bd7f2a-cab0-4208-b4c8-f2a24bca9169.json", + "bodyFileName": "repos_bitwiseman_github-api-test-rename2-c1bd7f2a.json", "headers": { "Date": "Wed, 02 Oct 2019 21:40:03 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api-1c232f75-a19d-455f-b0c5-4278cc80a1e9.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api-1c232f75.json similarity index 100% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api-1c232f75-a19d-455f-b0c5-4278cc80a1e9.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api-1c232f75.json diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351-e215-4bef-9756-a608a46e6c42.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351.json similarity index 99% rename from src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351-e215-4bef-9756-a608a46e6c42.json rename to src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351.json index 7fc984e97..84df81428 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351-e215-4bef-9756-a608a46e6c42.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/__files/repos_github-api_github-api_git_trees_master-ffd3e351.json @@ -5322,7 +5322,7 @@ "url": "https://api.github.com/repos/github-api/github-api/git/trees/23d4565bd270308657a4e5b65cb6e6bec6736b54" }, { - "path": "src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/__files", + "path": "src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlashtestGetDirectoryContentTrailingSlash/__files", "mode": "040000", "type": "tree", "sha": "98db44a404132445a934e7e1b28d0d94a8243a6e", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api-2-1c232f.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api-2-1c232f.json index 695c190c4..709da2f6c 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api-2-1c232f.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api-2-1c232f.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api_github-api-1c232f75-a19d-455f-b0c5-4278cc80a1e9.json", + "bodyFileName": "repos_github-api_github-api-1c232f75.json", "headers": { "Date": "Sat, 26 Oct 2019 01:27:03 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api_git_trees_master-3-ffd3e3.json b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api_git_trees_master-3-ffd3e3.json index cc67935ca..e50513232 100644 --- a/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api_git_trees_master-3-ffd3e3.json +++ b/src/test/resources/org/kohsuke/github/AppTest/wiremock/testTreesRecursive/mappings/repos_github-api_github-api_git_trees_master-3-ffd3e3.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api_github-api_git_trees_master-ffd3e351-e215-4bef-9756-a608a46e6c42.json", + "bodyFileName": "repos_github-api_github-api_git_trees_master-ffd3e351.json", "headers": { "Date": "Sat, 26 Oct 2019 01:27:04 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections-02ee4913-4f10-4403-9f86-c911719d8b88.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-02ee4913.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections-02ee4913-4f10-4403-9f86-c911719d8b88.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-02ee4913.json diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections_branches_master-040c1d69-d6af-4a94-b583-7d18957bad10.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-040c1d69.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections_branches_master-040c1d69-d6af-4a94-b583-7d18957bad10.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-040c1d69.json diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-aa97cf7b-7c9d-4c01-b7c5-bccc62b30873.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-aa97cf7b.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-aa97cf7b-7c9d-4c01-b7c5-bccc62b30873.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/__files/repos_github-api-test-org_temp-aa97cf7b.json diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-2-02ee49.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-2-02ee49.json index 92c684653..2ba676422 100644 --- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-2-02ee49.json +++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-2-02ee49.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_temp-testenablebranchprotections-02ee4913-4f10-4403-9f86-c911719d8b88.json", + "bodyFileName": "repos_github-api-test-org_temp-02ee4913.json", "headers": { "Date": "Tue, 19 Nov 2019 03:01:32 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master-3-040c1d.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-3-040c1d.json similarity index 93% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master-3-040c1d.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-3-040c1d.json index 53a068bad..4beb0fc44 100644 --- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master-3-040c1d.json +++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-3-040c1d.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_temp-testenablebranchprotections_branches_master-040c1d69-d6af-4a94-b583-7d18957bad10.json", + "bodyFileName": "repos_github-api-test-org_temp-040c1d69.json", "headers": { "Date": "Tue, 19 Nov 2019 03:01:32 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-4-aa97cf.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-4-aa97cf.json similarity index 94% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-4-aa97cf.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-4-aa97cf.json index e83de0db7..f83c39ebb 100644 --- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-4-aa97cf.json +++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableBranchProtections/mappings/repos_github-api-test-org_temp-testenablebranchprotections-4-aa97cf.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_temp-testenablebranchprotections_branches_master_protection-aa97cf7b-7c9d-4c01-b7c5-bccc62b30873.json", + "bodyFileName": "repos_github-api-test-org_temp-aa97cf7b.json", "headers": { "Date": "Tue, 19 Nov 2019 03:01:32 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/__files/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91-f2a6-4d52-b6d4-05e4a8be5df4.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/__files/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/__files/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91-f2a6-4d52-b6d4-05e4a8be5df4.json rename to src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/__files/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91.json diff --git a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/mappings/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-4-b57fab.json b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/mappings/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-4-b57fab.json index eeeb4a9be..577f44390 100644 --- a/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/mappings/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-4-b57fab.json +++ b/src/test/resources/org/kohsuke/github/GHBranchProtectionTest/wiremock/testEnableRequireReviewsOnly/mappings/repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-4-b57fab.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91-f2a6-4d52-b6d4-05e4a8be5df4.json", + "bodyFileName": "repos_github-api-test-org_temp-testenablerequirereviewsonly_branches_master_protection-b57fab91.json", "headers": { "Date": "Tue, 19 Nov 2019 03:01:41 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-3cdae02b-77ed-4fb7-96fa-fee8aab5e88d.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50-3cdae02b.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-3cdae02b-77ed-4fb7-96fa-fee8aab5e88d.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50-3cdae02b.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-04f85e50-583c-48ad-8d45-55368c542148.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-04f85e50.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-04f85e50-583c-48ad-8d45-55368c542148.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-04f85e50.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-1d4297f8-515f-48b0-8f13-99894911d416.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-1d4297f8.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-1d4297f8-515f-48b0-8f13-99894911d416.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-1d4297f8.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4be43bcb-37e3-4c54-8b0a-c190690dc820.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-4be43bcb.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4be43bcb-37e3-4c54-8b0a-c190690dc820.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-4be43bcb.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5b2d0899-ece6-4a5f-a8dc-4b0f296b21a1.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-5b2d0899.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5b2d0899-ece6-4a5f-a8dc-4b0f296b21a1.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-5b2d0899.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-64a83a7d-a195-4f3b-989e-293e3f23611a.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-64a83a7d.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-64a83a7d-a195-4f3b-989e-293e3f23611a.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-64a83a7d.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a5a649cc-8b2b-4c58-ba06-8445261108f8.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a5a649cc.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a5a649cc-8b2b-4c58-ba06-8445261108f8.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a5a649cc.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a971220e-d7f0-4919-9963-dbcedf5577e7.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a971220e.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a971220e-d7f0-4919-9963-dbcedf5577e7.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a971220e.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-e5080341-7377-4f3f-9427-388a105a91a7.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-e5080341.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-e5080341-7377-4f3f-9427-388a105a91a7.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/__files/repos_github-api-test-org_ghcontentintegrationtest-e5080341.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-e50803.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-e50803.json index 4dcbcc925..77527e6fa 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-e50803.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest-2-e50803.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-e5080341-7377-4f3f-9427-388a105a91a7.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-e5080341.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:44 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-6-3cdae0.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-6-3cdae0.json index c2639aed4..24f91ffee 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-6-3cdae0.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-6-3cdae0.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50-3cdae02b-77ed-4fb7-96fa-fee8aab5e88d.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50-3cdae02b.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:46 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-10-a5a649.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-10-a5a649.json index ccd2974fa..6f8a25ab0 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-10-a5a649.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-10-a5a649.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a5a649cc-8b2b-4c58-ba06-8445261108f8.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a5a649cc.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:48 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-3-a97122.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-3-a97122.json index e1ea2c44d..2d80fb6a1 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-3-a97122.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-3-a97122.json @@ -19,7 +19,7 @@ }, "response": { "status": 201, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-a971220e-d7f0-4919-9963-dbcedf5577e7.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-a971220e.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:45 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4-5b2d08.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4-5b2d08.json index 592697c56..f547f0863 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4-5b2d08.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4-5b2d08.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5b2d0899-ece6-4a5f-a8dc-4b0f296b21a1.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-5b2d0899.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:46 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5-4be43b.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5-4be43b.json index 83e6f3604..0305c121b 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5-4be43b.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-5-4be43b.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-4be43bcb-37e3-4c54-8b0a-c190690dc820.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-4be43bcb.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:46 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-7-64a83a.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-7-64a83a.json index a1884b577..6bb6a8431 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-7-64a83a.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-7-64a83a.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-64a83a7d-a195-4f3b-989e-293e3f23611a.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-64a83a7d.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:46 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-8-04f85e.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-8-04f85e.json index c4d1ce7b4..ef43d1f9b 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-8-04f85e.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-8-04f85e.json @@ -19,7 +19,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-04f85e50-583c-48ad-8d45-55368c542148.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-04f85e50.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:47 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-9-1d4297.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-9-1d4297.json index 4318de4bb..1253c5cc5 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-9-1d4297.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testCRUDContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-9-1d4297.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_testdirectory-50_test-file-tocreate-1txt-1d4297f8-515f-48b0-8f13-99894911d416.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest-50_test-file-tocreate-1txt-1d4297f8.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:47 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73-0706-4af1-86d4-005b3b91adba.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73-0706-4af1-86d4-005b3b91adba.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-2d908c.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-2d908c.json index 2d6d5314b..a9e111a8e 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-2d908c.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-2d908c.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73-0706-4af1-86d4-005b3b91adba.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-2d908c73.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:39 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734-fe48-4be5-b432-ddd9912ca0e5.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734-fe48-4be5-b432-ddd9912ca0e5.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-462ae7.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-462ae7.json index 2ee40a130..5cb1bf162 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-462ae7.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetDirectoryContentTrailingSlash/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-3-462ae7.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734-fe48-4be5-b432-ddd9912ca0e5.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-dir-with-3-entries-462ae734.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:41 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e-6949-43de-b9e8-bafb84e4b2a5.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e.json similarity index 100% rename from src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e-6949-43de-b9e8-bafb84e4b2a5.json rename to src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/__files/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e.json diff --git a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-4-3e4aa2.json b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-4-3e4aa2.json index 1c9cf47f3..23c396733 100644 --- a/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-4-3e4aa2.json +++ b/src/test/resources/org/kohsuke/github/GHContentIntegrationTest/wiremock/testGetFileContent/mappings/repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-4-3e4aa2.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e-6949-43de-b9e8-bafb84e4b2a5.json", + "bodyFileName": "repos_github-api-test-org_ghcontentintegrationtest_contents_ghcontent-ro_a-file-with-content-3e4aa25e.json", "headers": { "Date": "Tue, 26 Nov 2019 01:09:51 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org-b4a28742-c15b-4b7d-a6ce-45b33efa8289.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org-b4a28742-c15b-4b7d-a6ce-45b33efa8289.json new file mode 100644 index 000000000..99b5920cc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org-b4a28742-c15b-4b7d-a6ce-45b33efa8289.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 7, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org_teams-6d91c5d6-a8a1-4693-9b2a-dc136570b11b.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org_teams-6d91c5d6-a8a1-4693-9b2a-dc136570b11b.json new file mode 100644 index 000000000..9b84e5c18 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/orgs_github-api-test-org_teams-6d91c5d6-a8a1-4693-9b2a-dc136570b11b.json @@ -0,0 +1,55 @@ +{ + "name": "create-team-test", + "id": 3618001, + "node_id": "MDQ6VGVhbTM2MTgwMDE=", + "slug": "create-team-test", + "description": "Team description", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618001", + "html_url": "https://github.com/orgs/github-api-test-org/teams/create-team-test", + "members_url": "https://api.github.com/organizations/49127317/team/3618001/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618001/repos", + "permission": "pull", + "parent": { + "name": "Core Developers", + "id": 3617900, + "node_id": "MDQ6VGVhbTM2MTc5MDA=", + "slug": "core-developers", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3617900", + "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3617900/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617900/repos", + "permission": "pull" + }, + "created_at": "2020-01-25T19:41:44Z", + "updated_at": "2020-01-25T19:41:44Z", + "members_count": 1, + "repos_count": 1, + "organization": { + "login": "github-api-test-org", + "id": 49127317, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ5MTI3MzE3", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/49127317?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 4, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2019-03-31T17:42:10Z", + "updated_at": "2019-10-07T20:06:18Z", + "type": "Organization" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/user-b4c30850-48c1-46f6-83a4-52b7a1ff4765.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/user-b4c30850-48c1-46f6-83a4-52b7a1ff4765.json new file mode 100644 index 000000000..eaf71026b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/__files/user-b4c30850-48c1-46f6-83a4-52b7a1ff4765.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjIxMTk0Nzgy", + "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": "Tim Jacomb", + "company": "@KainosSoftwareLtd", + "blog": "", + "location": "UK", + "email": null, + "hireable": null, + "bio": "Software engineer and development best practices advocate.", + "public_repos": 135, + "public_gists": 17, + "followers": 17, + "following": 2, + "created_at": "2016-08-23T10:16:42Z", + "updated_at": "2020-01-25T14:47:46Z", + "private_gists": 11, + "total_private_repos": 6, + "owned_private_repos": 3, + "disk_usage": 33230, + "collaborators": 2, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org-2-b4a287.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org-2-b4a287.json new file mode 100644 index 000000000..2632333e9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org-2-b4a287.json @@ -0,0 +1,48 @@ +{ + "id": "b4a28742-c15b-4b7d-a6ce-45b33efa8289", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-b4a28742-c15b-4b7d-a6ce-45b33efa8289.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4933", + "X-RateLimit-Reset": "1579982958", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"977dd50269f5d021b7fe0e4870411bf3\"", + "Last-Modified": "Mon, 07 Oct 2019 20:06:18 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "D779:3EC91:442CAF:51E2F8:5E2C99F6" + } + }, + "uuid": "b4a28742-c15b-4b7d-a6ce-45b33efa8289", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org_teams-3-6d91c5.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org_teams-3-6d91c5.json new file mode 100644 index 000000000..bb4d8e99a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/orgs_github-api-test-org_teams-3-6d91c5.json @@ -0,0 +1,55 @@ +{ + "id": "6d91c5d6-a8a1-4693-9b2a-dc136570b11b", + "name": "orgs_github-api-test-org_teams", + "request": { + "url": "/orgs/github-api-test-org/teams", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"maintainers\":[\"bitwiseman\"],\"parent_team_id\":3617900,\"name\":\"create-team-test\",\"repo_names\":[\"github-api\"],\"description\":\"Team description\",\"privacy\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "orgs_github-api-test-org_teams-6d91c5d6-a8a1-4693-9b2a-dc136570b11b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:44 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4932", + "X-RateLimit-Reset": "1579982959", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "\"d3d6756d8fe199b3859b98ac3e64e321\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, repo", + "Location": "https://api.github.com/organizations/49127317/team/3618001", + "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'", + "X-GitHub-Request-Id": "D779:3EC91:442CB3:51E304:5E2C99F8" + } + }, + "uuid": "6d91c5d6-a8a1-4693-9b2a-dc136570b11b", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/user-1-b4c308.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/user-1-b4c308.json new file mode 100644 index 000000000..e91c568ed --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateAllArgsTeam/mappings/user-1-b4c308.json @@ -0,0 +1,48 @@ +{ + "id": "b4c30850-48c1-46f6-83a4-52b7a1ff4765", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-b4c30850-48c1-46f6-83a4-52b7a1ff4765.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:42 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4937", + "X-RateLimit-Reset": "1579982959", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"8ff93ad1eb46d27ae66bf8ddc6803adf\"", + "Last-Modified": "Sat, 25 Jan 2020 14:47:46 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "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'", + "X-GitHub-Request-Id": "D779:3EC91:442CA6:51E2F5:5E2C99F6" + } + }, + "uuid": "b4c30850-48c1-46f6-83a4-52b7a1ff4765", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org-285a50af-5b57-43a0-8e53-a6229e34bdc0.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org-285a50af-5b57-43a0-8e53-a6229e34bdc0.json new file mode 100644 index 000000000..99b5920cc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org-285a50af-5b57-43a0-8e53-a6229e34bdc0.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 7, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org_teams-78f8a9a6-6d92-4273-8b0b-e54cf83397c8.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org_teams-78f8a9a6-6d92-4273-8b0b-e54cf83397c8.json new file mode 100644 index 000000000..36d181cd0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/orgs_github-api-test-org_teams-78f8a9a6-6d92-4273-8b0b-e54cf83397c8.json @@ -0,0 +1,43 @@ +{ + "name": "create-team-test", + "id": 3618000, + "node_id": "MDQ6VGVhbTM2MTgwMDA=", + "slug": "create-team-test", + "description": null, + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618000", + "html_url": "https://github.com/orgs/github-api-test-org/teams/create-team-test", + "members_url": "https://api.github.com/organizations/49127317/team/3618000/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618000/repos", + "permission": "pull", + "parent": null, + "created_at": "2020-01-25T19:41:35Z", + "updated_at": "2020-01-25T19:41:35Z", + "members_count": 1, + "repos_count": 0, + "organization": { + "login": "github-api-test-org", + "id": 49127317, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ5MTI3MzE3", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/49127317?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 4, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2019-03-31T17:42:10Z", + "updated_at": "2019-10-07T20:06:18Z", + "type": "Organization" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/user-8f0f8961-4118-4b8b-9ec2-8477e5ff61fe.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/user-8f0f8961-4118-4b8b-9ec2-8477e5ff61fe.json new file mode 100644 index 000000000..eaf71026b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/__files/user-8f0f8961-4118-4b8b-9ec2-8477e5ff61fe.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 1958953, + "node_id": "MDQ6VXNlcjIxMTk0Nzgy", + "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": "Tim Jacomb", + "company": "@KainosSoftwareLtd", + "blog": "", + "location": "UK", + "email": null, + "hireable": null, + "bio": "Software engineer and development best practices advocate.", + "public_repos": 135, + "public_gists": 17, + "followers": 17, + "following": 2, + "created_at": "2016-08-23T10:16:42Z", + "updated_at": "2020-01-25T14:47:46Z", + "private_gists": 11, + "total_private_repos": 6, + "owned_private_repos": 3, + "disk_usage": 33230, + "collaborators": 2, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org-285a50.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org-285a50.json new file mode 100644 index 000000000..bfca8a9ae --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org-285a50.json @@ -0,0 +1,48 @@ +{ + "id": "285a50af-5b57-43a0-8e53-a6229e34bdc0", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-285a50af-5b57-43a0-8e53-a6229e34bdc0.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4941", + "X-RateLimit-Reset": "1579982959", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"977dd50269f5d021b7fe0e4870411bf3\"", + "Last-Modified": "Mon, 07 Oct 2019 20:06:18 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "D770:3B0BC:482A78B:5605300:5E2C99EE" + } + }, + "uuid": "285a50af-5b57-43a0-8e53-a6229e34bdc0", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org_teams-3-78f8a9.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org_teams-3-78f8a9.json new file mode 100644 index 000000000..4b939f499 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/orgs_github-api-test-org_teams-3-78f8a9.json @@ -0,0 +1,55 @@ +{ + "id": "78f8a9a6-6d92-4273-8b0b-e54cf83397c8", + "name": "orgs_github-api-test-org_teams", + "request": { + "url": "/orgs/github-api-test-org/teams", + "method": "POST", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"name\":\"create-team-test\",\"privacy\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 201, + "bodyFileName": "orgs_github-api-test-org_teams-78f8a9a6-6d92-4273-8b0b-e54cf83397c8.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "201 Created", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4940", + "X-RateLimit-Reset": "1579982959", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "\"ce0c63d2705890f614967cf87a262b09\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, repo", + "Location": "https://api.github.com/organizations/49127317/team/3618000", + "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'", + "X-GitHub-Request-Id": "D770:3B0BC:482A7B6:5605410:5E2C99EF" + } + }, + "uuid": "78f8a9a6-6d92-4273-8b0b-e54cf83397c8", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/user-1-8f0f89.json b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/user-1-8f0f89.json new file mode 100644 index 000000000..5cd792cef --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHOrganizationTest/wiremock/testCreateVisibleTeam/mappings/user-1-8f0f89.json @@ -0,0 +1,48 @@ +{ + "id": "8f0f8961-4118-4b8b-9ec2-8477e5ff61fe", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-8f0f8961-4118-4b8b-9ec2-8477e5ff61fe.json", + "headers": { + "Date": "Sat, 25 Jan 2020 19:41:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4945", + "X-RateLimit-Reset": "1579982959", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"8ff93ad1eb46d27ae66bf8ddc6803adf\"", + "Last-Modified": "Sat, 25 Jan 2020 14:47:46 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "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'", + "X-GitHub-Request-Id": "D770:3B0BC:482A6B4:56052E3:5E2C99ED" + } + }, + "uuid": "8f0f8961-4118-4b8b-9ec2-8477e5ff61fe", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org-ecf0c232-2c2b-4580-b12c-ddc025656f64.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org-ecf0c232-2c2b-4580-b12c-ddc025656f64.json new file mode 100644 index 000000000..61547e3d9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org-ecf0c232-2c2b-4580-b12c-ddc025656f64.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 9, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 3, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-6cee550b-e151-4598-8736-68d408a7028f.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-6cee550b-e151-4598-8736-68d408a7028f.json new file mode 100644 index 000000000..68fe73ac3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-6cee550b-e151-4598-8736-68d408a7028f.json @@ -0,0 +1,58 @@ +[ + { + "name": "Core Developers", + "id": 3617900, + "node_id": "MDQ6VGVhbTM2MTc5MDA=", + "slug": "core-developers", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3617900", + "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3617900/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617900/repos", + "permission": "pull", + "parent": null + }, + { + "name": "dummy-team", + "id": 3618279, + "node_id": "MDQ6VGVhbTM2MTgyNzk=", + "slug": "dummy-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3618279", + "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team", + "members_url": "https://api.github.com/organizations/49127317/team/3618279/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618279/repos", + "permission": "pull", + "parent": null + }, + { + "name": "slack-plugin Developers", + "id": 3618268, + "node_id": "MDQ6VGVhbTM2MTgyNjg=", + "slug": "slack-plugin-developers", + "description": null, + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618268", + "html_url": "https://github.com/orgs/github-api-test-org/teams/slack-plugin-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3618268/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618268/repos", + "permission": "pull", + "parent": null + }, + { + "name": "bitwiseman-team", + "id": 3617890, + "node_id": "MDQ6VGVhbTM2MTc4OTA=", + "slug": "bitwiseman-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3617890", + "html_url": "https://github.com/orgs/github-api-test-org/teams/bitwiseman-team", + "members_url": "https://api.github.com/organizations/49127317/team/3617890/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617890/repos", + "permission": "pull", + "parent": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9ce59a51-f556-4b3d-ac00-a4bf313ae3a8.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9ce59a51-f556-4b3d-ac00-a4bf313ae3a8.json new file mode 100644 index 000000000..527c770b7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9ce59a51-f556-4b3d-ac00-a4bf313ae3a8.json @@ -0,0 +1,58 @@ +[ + { + "name": "Core Developers", + "id": 3617900, + "node_id": "MDQ6VGVhbTM2MTc5MDA=", + "slug": "core-developers", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3617900", + "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3617900/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617900/repos", + "permission": "pull", + "parent": null + }, + { + "name": "dummy-team", + "id": 3618279, + "node_id": "MDQ6VGVhbTM2MTgyNzk=", + "slug": "dummy-team", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618279", + "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team", + "members_url": "https://api.github.com/organizations/49127317/team/3618279/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618279/repos", + "permission": "pull", + "parent": null + }, + { + "name": "slack-plugin Developers", + "id": 3618268, + "node_id": "MDQ6VGVhbTM2MTgyNjg=", + "slug": "slack-plugin-developers", + "description": null, + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618268", + "html_url": "https://github.com/orgs/github-api-test-org/teams/slack-plugin-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3618268/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618268/repos", + "permission": "pull", + "parent": null + }, + { + "name": "bitwiseman-team", + "id": 3617890, + "node_id": "MDQ6VGVhbTM2MTc4OTA=", + "slug": "bitwiseman-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3617890", + "html_url": "https://github.com/orgs/github-api-test-org/teams/bitwiseman-team", + "members_url": "https://api.github.com/organizations/49127317/team/3617890/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617890/repos", + "permission": "pull", + "parent": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9f5e2094-9034-4769-bb8c-0d82ff6db9c5.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9f5e2094-9034-4769-bb8c-0d82ff6db9c5.json new file mode 100644 index 000000000..68fe73ac3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/orgs_github-api-test-org_teams-9f5e2094-9034-4769-bb8c-0d82ff6db9c5.json @@ -0,0 +1,58 @@ +[ + { + "name": "Core Developers", + "id": 3617900, + "node_id": "MDQ6VGVhbTM2MTc5MDA=", + "slug": "core-developers", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3617900", + "html_url": "https://github.com/orgs/github-api-test-org/teams/core-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3617900/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617900/repos", + "permission": "pull", + "parent": null + }, + { + "name": "dummy-team", + "id": 3618279, + "node_id": "MDQ6VGVhbTM2MTgyNzk=", + "slug": "dummy-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3618279", + "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team", + "members_url": "https://api.github.com/organizations/49127317/team/3618279/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618279/repos", + "permission": "pull", + "parent": null + }, + { + "name": "slack-plugin Developers", + "id": 3618268, + "node_id": "MDQ6VGVhbTM2MTgyNjg=", + "slug": "slack-plugin-developers", + "description": null, + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618268", + "html_url": "https://github.com/orgs/github-api-test-org/teams/slack-plugin-developers", + "members_url": "https://api.github.com/organizations/49127317/team/3618268/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618268/repos", + "permission": "pull", + "parent": null + }, + { + "name": "bitwiseman-team", + "id": 3617890, + "node_id": "MDQ6VGVhbTM2MTc4OTA=", + "slug": "bitwiseman-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3617890", + "html_url": "https://github.com/orgs/github-api-test-org/teams/bitwiseman-team", + "members_url": "https://api.github.com/organizations/49127317/team/3617890/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3617890/repos", + "permission": "pull", + "parent": null + } +] \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e.json new file mode 100644 index 000000000..66f7c6941 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e.json @@ -0,0 +1,43 @@ +{ + "name": "dummy-team", + "id": 3618279, + "node_id": "MDQ6VGVhbTM2MTgyNzk=", + "slug": "dummy-team", + "description": "", + "privacy": "closed", + "url": "https://api.github.com/organizations/49127317/team/3618279", + "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team", + "members_url": "https://api.github.com/organizations/49127317/team/3618279/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618279/repos", + "permission": "pull", + "parent": null, + "created_at": "2020-01-26T10:31:35Z", + "updated_at": "2020-01-26T10:43:13Z", + "members_count": 1, + "repos_count": 0, + "organization": { + "login": "github-api-test-org", + "id": 49127317, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ5MTI3MzE3", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/49127317?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 5, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2019-03-31T17:42:10Z", + "updated_at": "2019-10-07T20:06:18Z", + "type": "Organization" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-f0948c22-babf-430d-beb6-2daf5efd7541.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-f0948c22-babf-430d-beb6-2daf5efd7541.json new file mode 100644 index 000000000..31cf5c08b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/teams_3618279-f0948c22-babf-430d-beb6-2daf5efd7541.json @@ -0,0 +1,43 @@ +{ + "name": "dummy-team", + "id": 3618279, + "node_id": "MDQ6VGVhbTM2MTgyNzk=", + "slug": "dummy-team", + "description": "", + "privacy": "secret", + "url": "https://api.github.com/organizations/49127317/team/3618279", + "html_url": "https://github.com/orgs/github-api-test-org/teams/dummy-team", + "members_url": "https://api.github.com/organizations/49127317/team/3618279/members{/member}", + "repositories_url": "https://api.github.com/organizations/49127317/team/3618279/repos", + "permission": "pull", + "parent": null, + "created_at": "2020-01-26T10:31:35Z", + "updated_at": "2020-01-26T10:43:14Z", + "members_count": 1, + "repos_count": 0, + "organization": { + "login": "github-api-test-org", + "id": 49127317, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ5MTI3MzE3", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/49127317?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 5, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2019-03-31T17:42:10Z", + "updated_at": "2019-10-07T20:06:18Z", + "type": "Organization" + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/user-bc58c48e-2441-4377-aa9a-e58df4073c39.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/user-bc58c48e-2441-4377-aa9a-e58df4073c39.json new file mode 100644 index 000000000..95d5b69c0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/__files/user-bc58c48e-2441-4377-aa9a-e58df4073c39.json @@ -0,0 +1,45 @@ +{ + "login": "bitwiseman", + "id": 21194782, + "node_id": "MDQ6VXNlcjIxMTk0Nzgy", + "avatar_url": "https://avatars3.githubusercontent.com/u/21194782?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": "Tim Jacomb", + "company": "@KainosSoftwareLtd", + "blog": "", + "location": "UK", + "email": null, + "hireable": null, + "bio": "Software engineer and development best practices advocate.", + "public_repos": 137, + "public_gists": 17, + "followers": 17, + "following": 2, + "created_at": "2016-08-23T10:16:42Z", + "updated_at": "2020-01-26T08:50:30Z", + "private_gists": 11, + "total_private_repos": 6, + "owned_private_repos": 3, + "disk_usage": 33230, + "collaborators": 2, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org-2-ecf0c2.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org-2-ecf0c2.json new file mode 100644 index 000000000..48f4ce19a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org-2-ecf0c2.json @@ -0,0 +1,48 @@ +{ + "id": "ecf0c232-2c2b-4580-b12c-ddc025656f64", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-ecf0c232-2c2b-4580-b12c-ddc025656f64.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:12 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4925", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"d211113b4423739223ae7cb0b5ef2b04\"", + "Last-Modified": "Mon, 07 Oct 2019 20:06:18 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E2033:C6B41E4:5E2D6D3F" + } + }, + "uuid": "ecf0c232-2c2b-4580-b12c-ddc025656f64", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-3-6cee55.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-3-6cee55.json new file mode 100644 index 000000000..5982f5287 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-3-6cee55.json @@ -0,0 +1,51 @@ +{ + "id": "6cee550b-e151-4598-8736-68d408a7028f", + "name": "orgs_github-api-test-org_teams", + "request": { + "url": "/orgs/github-api-test-org/teams", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org_teams-6cee550b-e151-4598-8736-68d408a7028f.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:12 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4924", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"2f6ea4e871ffd4cd3d81fa6ef489e9cf\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E20A6:C6B43DB:5E2D6D40" + } + }, + "uuid": "6cee550b-e151-4598-8736-68d408a7028f", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org-teams", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-orgs-github-api-test-org-teams-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-5-9ce59a.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-5-9ce59a.json new file mode 100644 index 000000000..973f719de --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-5-9ce59a.json @@ -0,0 +1,50 @@ +{ + "id": "9ce59a51-f556-4b3d-ac00-a4bf313ae3a8", + "name": "orgs_github-api-test-org_teams", + "request": { + "url": "/orgs/github-api-test-org/teams", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org_teams-9ce59a51-f556-4b3d-ac00-a4bf313ae3a8.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:13 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4922", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"c1b31aa926aa74612905022fb6686f05\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E224B:C6B45CC:5E2D6D41" + } + }, + "uuid": "9ce59a51-f556-4b3d-ac00-a4bf313ae3a8", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org-teams", + "requiredScenarioState": "scenario-1-orgs-github-api-test-org-teams-2", + "newScenarioState": "scenario-1-orgs-github-api-test-org-teams-3", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-7-9f5e20.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-7-9f5e20.json new file mode 100644 index 000000000..59565ebb0 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/orgs_github-api-test-org_teams-7-9f5e20.json @@ -0,0 +1,50 @@ +{ + "id": "9f5e2094-9034-4769-bb8c-0d82ff6db9c5", + "name": "orgs_github-api-test-org_teams", + "request": { + "url": "/orgs/github-api-test-org/teams", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org_teams-9f5e2094-9034-4769-bb8c-0d82ff6db9c5.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4920", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"2f6ea4e871ffd4cd3d81fa6ef489e9cf\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E23AF:C6B474B:5E2D6D42" + } + }, + "uuid": "9f5e2094-9034-4769-bb8c-0d82ff6db9c5", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org-teams", + "requiredScenarioState": "scenario-1-orgs-github-api-test-org-teams-3", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-4-c20ae9.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-4-c20ae9.json new file mode 100644 index 000000000..7b0ecb945 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-4-c20ae9.json @@ -0,0 +1,54 @@ +{ + "id": "c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e", + "name": "teams_3618279", + "request": { + "url": "/teams/3618279", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"privacy\":\"closed\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "teams_3618279-c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:13 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4923", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"3ac724b425d03a7e376d9ed5b8d309b6\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, repo", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E211C:C6B4468:5E2D6D40" + } + }, + "uuid": "c20ae9c8-4d3b-4c67-bac6-c33c9ad7ac3e", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-6-f0948c.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-6-f0948c.json new file mode 100644 index 000000000..0543b6324 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/teams_3618279-6-f0948c.json @@ -0,0 +1,54 @@ +{ + "id": "f0948c22-babf-430d-beb6-2daf5efd7541", + "name": "teams_3618279", + "request": { + "url": "/teams/3618279", + "method": "PATCH", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + }, + "bodyPatterns": [ + { + "equalToJson": "{\"privacy\":\"secret\"}", + "ignoreArrayOrder": true, + "ignoreExtraElements": true + } + ] + }, + "response": { + "status": 200, + "bodyFileName": "teams_3618279-f0948c22-babf-430d-beb6-2daf5efd7541.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:14 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4921", + "X-RateLimit-Reset": "1580037743", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"ba2374df0a799986650ab0776b0ddede\"", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "X-Accepted-OAuth-Scopes": "admin:org, repo", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E22BB:C6B464B:5E2D6D41" + } + }, + "uuid": "f0948c22-babf-430d-beb6-2daf5efd7541", + "persistent": true, + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/user-1-bc58c4.json b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/user-1-bc58c4.json new file mode 100644 index 000000000..41e39e0c5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/GHTeamTest/wiremock/testSetPrivacy/mappings/user-1-bc58c4.json @@ -0,0 +1,48 @@ +{ + "id": "bc58c48e-2441-4377-aa9a-e58df4073c39", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-bc58c48e-2441-4377-aa9a-e58df4073c39.json", + "headers": { + "Date": "Sun, 26 Jan 2020 10:43:11 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4927", + "X-RateLimit-Reset": "1580037742", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"761a302984106642d104212e9973a925\"", + "Last-Modified": "Sun, 26 Jan 2020 08:50:30 GMT", + "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages", + "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'", + "X-GitHub-Request-Id": "F148:392DB:A5E1E1E:C6B40DF:5E2D6D3F" + } + }, + "uuid": "bc58c48e-2441-4377-aa9a-e58df4073c39", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-0c314f70-2669-4eab-bf2e-f5589d189fc3.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-0c314f70-2669-4eab-bf2e-f5589d189fc3.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-0c314f70-2669-4eab-bf2e-f5589d189fc3.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-11c34ac5-e571-4be0-908f-34f415756461.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-11c34ac5-e571-4be0-908f-34f415756461.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-11c34ac5-e571-4be0-908f-34f415756461.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-1697d11d-e650-4abb-8133-76adca36d207.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-1697d11d-e650-4abb-8133-76adca36d207.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-1697d11d-e650-4abb-8133-76adca36d207.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-18196674-89f3-4d83-b040-8ba040eefd49.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-18196674-89f3-4d83-b040-8ba040eefd49.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-18196674-89f3-4d83-b040-8ba040eefd49.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-2207e235-976a-4140-903a-377a8dd1746c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-2207e235-976a-4140-903a-377a8dd1746c.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-2207e235-976a-4140-903a-377a8dd1746c.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-26564f19-513b-412a-8a71-299fc5559107.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-26564f19-513b-412a-8a71-299fc5559107.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-26564f19-513b-412a-8a71-299fc5559107.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-29f32c7d-9a05-4c8f-9d30-ccfd0600e382.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-29f32c7d-9a05-4c8f-9d30-ccfd0600e382.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-29f32c7d-9a05-4c8f-9d30-ccfd0600e382.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-3ff83aaf-e95a-4822-a07d-ce5ed0a69d72.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-3ff83aaf-e95a-4822-a07d-ce5ed0a69d72.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-3ff83aaf-e95a-4822-a07d-ce5ed0a69d72.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-41b780e5-520d-40c9-96a0-5706f9d1f7cd.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-41b780e5-520d-40c9-96a0-5706f9d1f7cd.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-41b780e5-520d-40c9-96a0-5706f9d1f7cd.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-5b634f3d-fc06-4fe5-881e-939025d44b3e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-5b634f3d-fc06-4fe5-881e-939025d44b3e.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-5b634f3d-fc06-4fe5-881e-939025d44b3e.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-679857c5-9fbc-4649-a3ba-e16f6d3dd634.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-679857c5-9fbc-4649-a3ba-e16f6d3dd634.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-679857c5-9fbc-4649-a3ba-e16f6d3dd634.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-6c31e6bc-0743-4129-9d14-971c4ccc206b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-6c31e6bc-0743-4129-9d14-971c4ccc206b.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-6c31e6bc-0743-4129-9d14-971c4ccc206b.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-87ba7d98-2c27-4e74-b00d-7e68b2edf46b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-87ba7d98-2c27-4e74-b00d-7e68b2edf46b.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-87ba7d98-2c27-4e74-b00d-7e68b2edf46b.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-a56b2a87-ca72-4563-a260-8fa3edbc01c8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-a56b2a87-ca72-4563-a260-8fa3edbc01c8.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-a56b2a87-ca72-4563-a260-8fa3edbc01c8.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-ab454363-9011-43bb-b8ad-25db5e637745.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-ab454363-9011-43bb-b8ad-25db5e637745.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-ab454363-9011-43bb-b8ad-25db5e637745.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-aed0ad15-f9fa-46ae-ab69-21636107fa98.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-aed0ad15-f9fa-46ae-ab69-21636107fa98.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-aed0ad15-f9fa-46ae-ab69-21636107fa98.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-b58aab3d-fba1-4ade-8f09-9f4454ed9503.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-b58aab3d-fba1-4ade-8f09-9f4454ed9503.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-b58aab3d-fba1-4ade-8f09-9f4454ed9503.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-dbc7af41-968a-4896-ab95-ab2517627b62.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-dbc7af41-968a-4896-ab95-ab2517627b62.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-dbc7af41-968a-4896-ab95-ab2517627b62.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e1da686a-60ab-4ae1-bd38-50e48fbd8359.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e1da686a-60ab-4ae1-bd38-50e48fbd8359.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e1da686a-60ab-4ae1-bd38-50e48fbd8359.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e8bcc900-cf03-4965-b873-cb3dd08d96a9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e8bcc900-cf03-4965-b873-cb3dd08d96a9.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e8bcc900-cf03-4965-b873-cb3dd08d96a9.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e9b92506-2108-4a5a-857a-7148561f8f9f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e9b92506-2108-4a5a-857a-7148561f8f9f.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/orgs_github-api-test-org-e9b92506-2108-4a5a-857a-7148561f8f9f.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-2fd80c42-5b79-4ccd-992e-e11223b55091.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-2fd80c42-5b79-4ccd-992e-e11223b55091.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-2fd80c42-5b79-4ccd-992e-e11223b55091.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-733192e5-f8b3-4498-bf3f-e89fa280bced.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-733192e5-f8b3-4498-bf3f-e89fa280bced.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-733192e5-f8b3-4498-bf3f-e89fa280bced.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-944cefaf-a462-4bbf-8f09-87612eb625c7.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-944cefaf-a462-4bbf-8f09-87612eb625c7.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-944cefaf-a462-4bbf-8f09-87612eb625c7.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-b8119a27-5fa5-406a-b5f6-c0d3a966b529.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-b8119a27-5fa5-406a-b5f6-c0d3a966b529.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-b8119a27-5fa5-406a-b5f6-c0d3a966b529.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-bfd48b7a-b57d-421c-8624-c024e0d637a0.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-bfd48b7a-b57d-421c-8624-c024e0d637a0.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-bfd48b7a-b57d-421c-8624-c024e0d637a0.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-f66a5d48-3dda-4b5a-91b7-720423ae348d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-f66a5d48-3dda-4b5a-91b7-720423ae348d.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/__files/user-f66a5d48-3dda-4b5a-91b7-720423ae348d.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-11-5b634f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-11-5b634f.json new file mode 100644 index 000000000..4fcb4ecfa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-11-5b634f.json @@ -0,0 +1,51 @@ +{ + "id": "5b634f3d-fc06-4fe5-881e-939025d44b3e", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5b634f3d-fc06-4fe5-881e-939025d44b3e.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4870", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E43:E62E7C:5E2BCF9F" + } + }, + "uuid": "5b634f3d-fc06-4fe5-881e-939025d44b3e", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-8", + "newScenarioState": "scenario-2-orgs-github-api-test-org-9", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-12-29f32c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-12-29f32c.json new file mode 100644 index 000000000..1359fdedf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-12-29f32c.json @@ -0,0 +1,51 @@ +{ + "id": "29f32c7d-9a05-4c8f-9d30-ccfd0600e382", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-29f32c7d-9a05-4c8f-9d30-ccfd0600e382.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4869", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E4F:E62E83:5E2BCF9F" + } + }, + "uuid": "29f32c7d-9a05-4c8f-9d30-ccfd0600e382", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-9", + "newScenarioState": "scenario-2-orgs-github-api-test-org-10", + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-13-181966.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-13-181966.json new file mode 100644 index 000000000..f510cbc9b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-13-181966.json @@ -0,0 +1,52 @@ +{ + "id": "18196674-89f3-4d83-b040-8ba040eefd49", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-18196674-89f3-4d83-b040-8ba040eefd49.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4868", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E5D:E62E94:5E2BCF9F" + } + }, + "uuid": "18196674-89f3-4d83-b040-8ba040eefd49", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-10", + "newScenarioState": "scenario-2-orgs-github-api-test-org-11", + "insertionIndex": 13 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-14-11c34a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-14-11c34a.json new file mode 100644 index 000000000..756341f1f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-14-11c34a.json @@ -0,0 +1,51 @@ +{ + "id": "11c34ac5-e571-4be0-908f-34f415756461", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-11c34ac5-e571-4be0-908f-34f415756461.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4867", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E6C:E62EAA:5E2BCFA0" + } + }, + "uuid": "11c34ac5-e571-4be0-908f-34f415756461", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-11", + "newScenarioState": "scenario-2-orgs-github-api-test-org-12", + "insertionIndex": 14 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-15-41b780.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-15-41b780.json new file mode 100644 index 000000000..f0ce08d32 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-15-41b780.json @@ -0,0 +1,51 @@ +{ + "id": "41b780e5-520d-40c9-96a0-5706f9d1f7cd", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-41b780e5-520d-40c9-96a0-5706f9d1f7cd.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4866", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E7D:E62EBA:5E2BCFA0" + } + }, + "uuid": "41b780e5-520d-40c9-96a0-5706f9d1f7cd", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-12", + "newScenarioState": "scenario-2-orgs-github-api-test-org-13", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-16-6c31e6.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-16-6c31e6.json new file mode 100644 index 000000000..ee1bc3241 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-16-6c31e6.json @@ -0,0 +1,51 @@ +{ + "id": "6c31e6bc-0743-4129-9d14-971c4ccc206b", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-6c31e6bc-0743-4129-9d14-971c4ccc206b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:24 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4865", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E8F:E62ED0:5E2BCFA0" + } + }, + "uuid": "6c31e6bc-0743-4129-9d14-971c4ccc206b", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-13", + "newScenarioState": "scenario-2-orgs-github-api-test-org-14", + "insertionIndex": 16 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-18-b58aab.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-18-b58aab.json new file mode 100644 index 000000000..27084e31f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-18-b58aab.json @@ -0,0 +1,51 @@ +{ + "id": "b58aab3d-fba1-4ade-8f09-9f4454ed9503", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-b58aab3d-fba1-4ade-8f09-9f4454ed9503.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4863", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E9E:E62EEB:5E2BCFA1" + } + }, + "uuid": "b58aab3d-fba1-4ade-8f09-9f4454ed9503", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-14", + "newScenarioState": "scenario-2-orgs-github-api-test-org-15", + "insertionIndex": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-2-2207e2.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-2-2207e2.json new file mode 100644 index 000000000..7dce936a5 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-2-2207e2.json @@ -0,0 +1,51 @@ +{ + "id": "2207e235-976a-4140-903a-377a8dd1746c", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-2207e235-976a-4140-903a-377a8dd1746c.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4879", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6DE1:E62E05:5E2BCF9D" + } + }, + "uuid": "2207e235-976a-4140-903a-377a8dd1746c", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-orgs-github-api-test-org-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-20-1697d1.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-20-1697d1.json new file mode 100644 index 000000000..f51ec155f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-20-1697d1.json @@ -0,0 +1,51 @@ +{ + "id": "1697d11d-e650-4abb-8133-76adca36d207", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-1697d11d-e650-4abb-8133-76adca36d207.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4861", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6EB7:E62F09:5E2BCFA1" + } + }, + "uuid": "1697d11d-e650-4abb-8133-76adca36d207", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-15", + "newScenarioState": "scenario-2-orgs-github-api-test-org-16", + "insertionIndex": 20 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-21-ab4543.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-21-ab4543.json new file mode 100644 index 000000000..b0c975752 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-21-ab4543.json @@ -0,0 +1,51 @@ +{ + "id": "ab454363-9011-43bb-b8ad-25db5e637745", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-ab454363-9011-43bb-b8ad-25db5e637745.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4860", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6EC7:E62F19:5E2BCFA1" + } + }, + "uuid": "ab454363-9011-43bb-b8ad-25db5e637745", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-16", + "newScenarioState": "scenario-2-orgs-github-api-test-org-17", + "insertionIndex": 21 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-22-a56b2a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-22-a56b2a.json new file mode 100644 index 000000000..760bff88f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-22-a56b2a.json @@ -0,0 +1,52 @@ +{ + "id": "a56b2a87-ca72-4563-a260-8fa3edbc01c8", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-a56b2a87-ca72-4563-a260-8fa3edbc01c8.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:26 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4859", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6ED7:E62F2A:5E2BCFA1" + } + }, + "uuid": "a56b2a87-ca72-4563-a260-8fa3edbc01c8", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-17", + "newScenarioState": "scenario-2-orgs-github-api-test-org-18", + "insertionIndex": 22 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-23-e9b925.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-23-e9b925.json new file mode 100644 index 000000000..f65037b03 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-23-e9b925.json @@ -0,0 +1,52 @@ +{ + "id": "e9b92506-2108-4a5a-857a-7148561f8f9f", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-e9b92506-2108-4a5a-857a-7148561f8f9f.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:26 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4858", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6EDD:E62F39:5E2BCFA2" + } + }, + "uuid": "e9b92506-2108-4a5a-857a-7148561f8f9f", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-18", + "newScenarioState": "scenario-2-orgs-github-api-test-org-19", + "insertionIndex": 23 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-24-aed0ad.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-24-aed0ad.json new file mode 100644 index 000000000..bec2ffd19 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-24-aed0ad.json @@ -0,0 +1,51 @@ +{ + "id": "aed0ad15-f9fa-46ae-ab69-21636107fa98", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-aed0ad15-f9fa-46ae-ab69-21636107fa98.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:26 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4857", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6EF3:E62F48:5E2BCFA2" + } + }, + "uuid": "aed0ad15-f9fa-46ae-ab69-21636107fa98", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-19", + "newScenarioState": "scenario-2-orgs-github-api-test-org-20", + "insertionIndex": 24 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-25-0c314f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-25-0c314f.json new file mode 100644 index 000000000..06f56ce47 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-25-0c314f.json @@ -0,0 +1,51 @@ +{ + "id": "0c314f70-2669-4eab-bf2e-f5589d189fc3", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-0c314f70-2669-4eab-bf2e-f5589d189fc3.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4856", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6F00:E62F5B:5E2BCFA2" + } + }, + "uuid": "0c314f70-2669-4eab-bf2e-f5589d189fc3", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-20", + "newScenarioState": "scenario-2-orgs-github-api-test-org-21", + "insertionIndex": 25 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-27-87ba7d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-27-87ba7d.json new file mode 100644 index 000000000..10a79a416 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-27-87ba7d.json @@ -0,0 +1,50 @@ +{ + "id": "87ba7d98-2c27-4e74-b00d-7e68b2edf46b", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-87ba7d98-2c27-4e74-b00d-7e68b2edf46b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4854", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6F20:E62F7F:5E2BCFA3" + } + }, + "uuid": "87ba7d98-2c27-4e74-b00d-7e68b2edf46b", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-21", + "insertionIndex": 27 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-3-679857.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-3-679857.json new file mode 100644 index 000000000..f8166169b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-3-679857.json @@ -0,0 +1,51 @@ +{ + "id": "679857c5-9fbc-4649-a3ba-e16f6d3dd634", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-679857c5-9fbc-4649-a3ba-e16f6d3dd634.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4878", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6DEE:E62E0F:5E2BCF9D" + } + }, + "uuid": "679857c5-9fbc-4649-a3ba-e16f6d3dd634", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-2", + "newScenarioState": "scenario-2-orgs-github-api-test-org-3", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-4-26564f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-4-26564f.json new file mode 100644 index 000000000..9612cea15 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-4-26564f.json @@ -0,0 +1,51 @@ +{ + "id": "26564f19-513b-412a-8a71-299fc5559107", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-26564f19-513b-412a-8a71-299fc5559107.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4877", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6DFD:E62E25:5E2BCF9D" + } + }, + "uuid": "26564f19-513b-412a-8a71-299fc5559107", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-3", + "newScenarioState": "scenario-2-orgs-github-api-test-org-4", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-5-e8bcc9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-5-e8bcc9.json new file mode 100644 index 000000000..33e164db4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-5-e8bcc9.json @@ -0,0 +1,51 @@ +{ + "id": "e8bcc900-cf03-4965-b873-cb3dd08d96a9", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-e8bcc900-cf03-4965-b873-cb3dd08d96a9.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4876", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E08:E62E38:5E2BCF9E" + } + }, + "uuid": "e8bcc900-cf03-4965-b873-cb3dd08d96a9", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-4", + "newScenarioState": "scenario-2-orgs-github-api-test-org-5", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-6-e1da68.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-6-e1da68.json new file mode 100644 index 000000000..b8d78efdf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-6-e1da68.json @@ -0,0 +1,51 @@ +{ + "id": "e1da686a-60ab-4ae1-bd38-50e48fbd8359", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-e1da686a-60ab-4ae1-bd38-50e48fbd8359.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4875", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E19:E62E45:5E2BCF9E" + } + }, + "uuid": "e1da686a-60ab-4ae1-bd38-50e48fbd8359", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-5", + "newScenarioState": "scenario-2-orgs-github-api-test-org-6", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-7-dbc7af.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-7-dbc7af.json new file mode 100644 index 000000000..15708dc67 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-7-dbc7af.json @@ -0,0 +1,51 @@ +{ + "id": "dbc7af41-968a-4896-ab95-ab2517627b62", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-dbc7af41-968a-4896-ab95-ab2517627b62.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4874", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E21:E62E4C:5E2BCF9E" + } + }, + "uuid": "dbc7af41-968a-4896-ab95-ab2517627b62", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-6", + "newScenarioState": "scenario-2-orgs-github-api-test-org-7", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-9-3ff83a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-9-3ff83a.json new file mode 100644 index 000000000..941dd688a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/orgs_github-api-test-org-9-3ff83a.json @@ -0,0 +1,51 @@ +{ + "id": "3ff83aaf-e95a-4822-a07d-ce5ed0a69d72", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-3ff83aaf-e95a-4822-a07d-ce5ed0a69d72.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4872", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E2F:E62E63:5E2BCF9F" + } + }, + "uuid": "3ff83aaf-e95a-4822-a07d-ce5ed0a69d72", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-7", + "newScenarioState": "scenario-2-orgs-github-api-test-org-8", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-1-733192.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-1-733192.json new file mode 100644 index 000000000..0100f1e53 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-1-733192.json @@ -0,0 +1,52 @@ +{ + "id": "733192e5-f8b3-4498-bf3f-e89fa280bced", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-733192e5-f8b3-4498-bf3f-e89fa280bced.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4880", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6DDB:E62DFD:5E2BCF9D" + } + }, + "uuid": "733192e5-f8b3-4498-bf3f-e89fa280bced", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-user-2", + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-10-2fd80c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-10-2fd80c.json new file mode 100644 index 000000000..5907594d4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-10-2fd80c.json @@ -0,0 +1,51 @@ +{ + "id": "2fd80c42-5b79-4ccd-992e-e11223b55091", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-2fd80c42-5b79-4ccd-992e-e11223b55091.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4871", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E3A:E62E71:5E2BCF9F" + } + }, + "uuid": "2fd80c42-5b79-4ccd-992e-e11223b55091", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-3", + "newScenarioState": "scenario-1-user-4", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-17-944cef.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-17-944cef.json new file mode 100644 index 000000000..4c3fc0794 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-17-944cef.json @@ -0,0 +1,51 @@ +{ + "id": "944cefaf-a462-4bbf-8f09-87612eb625c7", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-944cefaf-a462-4bbf-8f09-87612eb625c7.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4864", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E98:E62EDD:5E2BCFA0" + } + }, + "uuid": "944cefaf-a462-4bbf-8f09-87612eb625c7", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-4", + "newScenarioState": "scenario-1-user-5", + "insertionIndex": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-19-bfd48b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-19-bfd48b.json new file mode 100644 index 000000000..dc39d954f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-19-bfd48b.json @@ -0,0 +1,51 @@ +{ + "id": "bfd48b7a-b57d-421c-8624-c024e0d637a0", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-bfd48b7a-b57d-421c-8624-c024e0d637a0.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:25 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4862", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6EAC:E62EFD:5E2BCFA1" + } + }, + "uuid": "bfd48b7a-b57d-421c-8624-c024e0d637a0", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-5", + "newScenarioState": "scenario-1-user-6", + "insertionIndex": 19 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-26-f66a5d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-26-f66a5d.json new file mode 100644 index 000000000..ad994df91 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-26-f66a5d.json @@ -0,0 +1,50 @@ +{ + "id": "f66a5d48-3dda-4b5a-91b7-720423ae348d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-f66a5d48-3dda-4b5a-91b7-720423ae348d.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4855", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6F07:E62F69:5E2BCFA3" + } + }, + "uuid": "f66a5d48-3dda-4b5a-91b7-720423ae348d", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-6", + "insertionIndex": 26 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-8-b8119a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-8-b8119a.json new file mode 100644 index 000000000..0be7c6d58 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamConnectionExceptions/mappings/user-8-b8119a.json @@ -0,0 +1,51 @@ +{ + "id": "b8119a27-5fa5-406a-b5f6-c0d3a966b529", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-b8119a27-5fa5-406a-b5f6-c0d3a966b529.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:23 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4873", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEC4:4E06:BE6E28:E62E59:5E2BCF9E" + } + }, + "uuid": "b8119a27-5fa5-406a-b5f6-c0d3a966b529", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-2", + "newScenarioState": "scenario-1-user-3", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/orgs_github-api-test-org-622cfe3b-ae86-4b2c-b2c3-97fc698c11a3.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/orgs_github-api-test-org-622cfe3b-ae86-4b2c-b2c3-97fc698c11a3.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/orgs_github-api-test-org-622cfe3b-ae86-4b2c-b2c3-97fc698c11a3.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-5410872a-37cf-4246-acce-600f3271d30d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-5410872a-37cf-4246-acce-600f3271d30d.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-5410872a-37cf-4246-acce-600f3271d30d.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-701c4dd4-9fd7-4318-b2fc-555134913ada.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-701c4dd4-9fd7-4318-b2fc-555134913ada.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-701c4dd4-9fd7-4318-b2fc-555134913ada.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-8ce0df73-96ad-4477-9ccf-5264e6e47d68.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-8ce0df73-96ad-4477-9ccf-5264e6e47d68.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/__files/user-8ce0df73-96ad-4477-9ccf-5264e6e47d68.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-2-622cfe.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-2-622cfe.json new file mode 100644 index 000000000..8281b20b4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-2-622cfe.json @@ -0,0 +1,48 @@ +{ + "id": "622cfe3b-ae86-4b2c-b2c3-97fc698c11a3", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-622cfe3b-ae86-4b2c-b2c3-97fc698c11a3.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4979", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A658:8035DE:5E2BCF67" + } + }, + "uuid": "622cfe3b-ae86-4b2c-b2c3-97fc698c11a3", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-4-89ad96.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-4-89ad96.json new file mode 100644 index 000000000..9120244cf --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-4-89ad96.json @@ -0,0 +1,44 @@ +{ + "id": "89ad96c9-ae91-4a67-8408-0772316c2abd", + "name": "orgs_github-api-test-org-missing", + "request": { + "url": "/orgs/github-api-test-org-missing", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/orgs/#get-an-organization\"}", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "404 Not Found", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4977", + "X-RateLimit-Reset": "1579932373", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A661:8035EB:5E2BCF68" + } + }, + "uuid": "89ad96c9-ae91-4a67-8408-0772316c2abd", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org-missing", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-orgs-github-api-test-org-missing-2", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-6-8ded92.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-6-8ded92.json new file mode 100644 index 000000000..93ffc3056 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/orgs_github-api-test-org-missing-6-8ded92.json @@ -0,0 +1,43 @@ +{ + "id": "8ded926e-67a4-429d-82f2-e003b26046d3", + "name": "orgs_github-api-test-org-missing", + "request": { + "url": "/orgs/github-api-test-org-missing", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 404, + "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/orgs/#get-an-organization\"}", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "404 Not Found", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4975", + "X-RateLimit-Reset": "1579932373", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A66F:8035FD:5E2BCF68" + } + }, + "uuid": "8ded926e-67a4-429d-82f2-e003b26046d3", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org-missing", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-missing-2", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-1-701c4d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-1-701c4d.json new file mode 100644 index 000000000..a468fb7ff --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-1-701c4d.json @@ -0,0 +1,51 @@ +{ + "id": "701c4dd4-9fd7-4318-b2fc-555134913ada", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-701c4dd4-9fd7-4318-b2fc-555134913ada.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:27 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4980", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A652:8035DB:5E2BCF67" + } + }, + "uuid": "701c4dd4-9fd7-4318-b2fc-555134913ada", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-user-2", + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-3-541087.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-3-541087.json new file mode 100644 index 000000000..404289de7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-3-541087.json @@ -0,0 +1,51 @@ +{ + "id": "5410872a-37cf-4246-acce-600f3271d30d", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-5410872a-37cf-4246-acce-600f3271d30d.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4978", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A65C:8035E4:5E2BCF68" + } + }, + "uuid": "5410872a-37cf-4246-acce-600f3271d30d", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-2", + "newScenarioState": "scenario-1-user-3", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-5-8ce0df.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-5-8ce0df.json new file mode 100644 index 000000000..13b01fd5e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testInputStreamFailureExceptions/mappings/user-5-8ce0df.json @@ -0,0 +1,50 @@ +{ + "id": "8ce0df73-96ad-4477-9ccf-5264e6e47d68", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-8ce0df73-96ad-4477-9ccf-5264e6e47d68.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:17:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4976", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FE45:1B3A:69A667:8035F4:5E2BCF68" + } + }, + "uuid": "8ce0df73-96ad-4477-9ccf-5264e6e47d68", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-3", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-06661cc8-79e8-4092-8d57-4971754c4f67.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-06661cc8-79e8-4092-8d57-4971754c4f67.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-06661cc8-79e8-4092-8d57-4971754c4f67.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2a62d2db-5cc9-4266-9859-95513efd4fea.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2a62d2db-5cc9-4266-9859-95513efd4fea.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2a62d2db-5cc9-4266-9859-95513efd4fea.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2cd18bd9-8a1f-454d-be74-85611906796b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2cd18bd9-8a1f-454d-be74-85611906796b.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-2cd18bd9-8a1f-454d-be74-85611906796b.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-466537f0-745f-41d3-a650-e4fcfbd59e65.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-466537f0-745f-41d3-a650-e4fcfbd59e65.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-466537f0-745f-41d3-a650-e4fcfbd59e65.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-553b71f9-eff3-45b8-ae76-833e137297ac.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-553b71f9-eff3-45b8-ae76-833e137297ac.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-553b71f9-eff3-45b8-ae76-833e137297ac.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-5efe6d8a-e833-4fd9-9213-d3be1cfdabc7.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-5efe6d8a-e833-4fd9-9213-d3be1cfdabc7.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-5efe6d8a-e833-4fd9-9213-d3be1cfdabc7.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-62ca8648-119b-448f-86c6-97928378f834.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-62ca8648-119b-448f-86c6-97928378f834.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-62ca8648-119b-448f-86c6-97928378f834.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-8f46cc12-8654-414a-8706-8584aa642cd9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-8f46cc12-8654-414a-8706-8584aa642cd9.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-8f46cc12-8654-414a-8706-8584aa642cd9.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-ff502c42-96ef-419d-b8d0-4381e1541b45.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-ff502c42-96ef-419d-b8d0-4381e1541b45.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/orgs_github-api-test-org-ff502c42-96ef-419d-b8d0-4381e1541b45.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-03f5d1e3-0add-4dac-9f9c-48145c86cec0.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-03f5d1e3-0add-4dac-9f9c-48145c86cec0.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-03f5d1e3-0add-4dac-9f9c-48145c86cec0.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-28c110e8-5558-4fc4-aee4-e5df36b88ce7.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-28c110e8-5558-4fc4-aee4-e5df36b88ce7.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-28c110e8-5558-4fc4-aee4-e5df36b88ce7.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-6e140e39-8c0e-41ef-83be-438d573acced.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-6e140e39-8c0e-41ef-83be-438d573acced.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-6e140e39-8c0e-41ef-83be-438d573acced.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-816c95a5-01d4-42ab-91cf-bd308ca9780b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-816c95a5-01d4-42ab-91cf-bd308ca9780b.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-816c95a5-01d4-42ab-91cf-bd308ca9780b.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-c3924d32-a472-4ec5-af6f-242f9529066c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-c3924d32-a472-4ec5-af6f-242f9529066c.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-c3924d32-a472-4ec5-af6f-242f9529066c.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/__files/user-d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-10-2cd18b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-10-2cd18b.json new file mode 100644 index 000000000..7bf4eb479 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-10-2cd18b.json @@ -0,0 +1,51 @@ +{ + "id": "2cd18bd9-8a1f-454d-be74-85611906796b", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-2cd18bd9-8a1f-454d-be74-85611906796b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4842", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC34C:8742EC:5E2BCFA6" + } + }, + "uuid": "2cd18bd9-8a1f-454d-be74-85611906796b", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-6", + "newScenarioState": "scenario-2-orgs-github-api-test-org-7", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-12-5efe6d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-12-5efe6d.json new file mode 100644 index 000000000..7562671fc --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-12-5efe6d.json @@ -0,0 +1,51 @@ +{ + "id": "5efe6d8a-e833-4fd9-9213-d3be1cfdabc7", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5efe6d8a-e833-4fd9-9213-d3be1cfdabc7.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4840", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC360:8742FE:5E2BCFA7" + } + }, + "uuid": "5efe6d8a-e833-4fd9-9213-d3be1cfdabc7", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-7", + "newScenarioState": "scenario-2-orgs-github-api-test-org-8", + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-13-553b71.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-13-553b71.json new file mode 100644 index 000000000..2ee78be65 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-13-553b71.json @@ -0,0 +1,51 @@ +{ + "id": "553b71f9-eff3-45b8-ae76-833e137297ac", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-553b71f9-eff3-45b8-ae76-833e137297ac.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4839", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC369:87430D:5E2BCFA7" + } + }, + "uuid": "553b71f9-eff3-45b8-ae76-833e137297ac", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-8", + "newScenarioState": "scenario-2-orgs-github-api-test-org-9", + "insertionIndex": 13 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-15-2a62d2.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-15-2a62d2.json new file mode 100644 index 000000000..2b32388b9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-15-2a62d2.json @@ -0,0 +1,50 @@ +{ + "id": "2a62d2db-5cc9-4266-9859-95513efd4fea", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-2a62d2db-5cc9-4266-9859-95513efd4fea.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4837", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC381:87432B:5E2BCFA8" + } + }, + "uuid": "2a62d2db-5cc9-4266-9859-95513efd4fea", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-9", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-2-62ca86.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-2-62ca86.json new file mode 100644 index 000000000..72c8d8814 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-2-62ca86.json @@ -0,0 +1,51 @@ +{ + "id": "62ca8648-119b-448f-86c6-97928378f834", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-62ca8648-119b-448f-86c6-97928378f834.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4850", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC302:874296:5E2BCFA4" + } + }, + "uuid": "62ca8648-119b-448f-86c6-97928378f834", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-orgs-github-api-test-org-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-3-466537.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-3-466537.json new file mode 100644 index 000000000..e09187601 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-3-466537.json @@ -0,0 +1,51 @@ +{ + "id": "466537f0-745f-41d3-a650-e4fcfbd59e65", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-466537f0-745f-41d3-a650-e4fcfbd59e65.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4849", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC30C:87429F:5E2BCFA4" + } + }, + "uuid": "466537f0-745f-41d3-a650-e4fcfbd59e65", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-2", + "newScenarioState": "scenario-2-orgs-github-api-test-org-3", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-5-ff502c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-5-ff502c.json new file mode 100644 index 000000000..c255ca6e2 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-5-ff502c.json @@ -0,0 +1,51 @@ +{ + "id": "ff502c42-96ef-419d-b8d0-4381e1541b45", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-ff502c42-96ef-419d-b8d0-4381e1541b45.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4847", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC31A:8742B2:5E2BCFA5" + } + }, + "uuid": "ff502c42-96ef-419d-b8d0-4381e1541b45", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-3", + "newScenarioState": "scenario-2-orgs-github-api-test-org-4", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-7-06661c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-7-06661c.json new file mode 100644 index 000000000..01349395f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-7-06661c.json @@ -0,0 +1,51 @@ +{ + "id": "06661cc8-79e8-4092-8d57-4971754c4f67", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-06661cc8-79e8-4092-8d57-4971754c4f67.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4845", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC32F:8742C3:5E2BCFA5" + } + }, + "uuid": "06661cc8-79e8-4092-8d57-4971754c4f67", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-4", + "newScenarioState": "scenario-2-orgs-github-api-test-org-5", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-8-8f46cc.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-8-8f46cc.json new file mode 100644 index 000000000..3f56f6e5a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/orgs_github-api-test-org-8-8f46cc.json @@ -0,0 +1,51 @@ +{ + "id": "8f46cc12-8654-414a-8706-8584aa642cd9", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-8f46cc12-8654-414a-8706-8584aa642cd9.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4844", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC33C:8742D5:5E2BCFA6" + } + }, + "uuid": "8f46cc12-8654-414a-8706-8584aa642cd9", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-5", + "newScenarioState": "scenario-2-orgs-github-api-test-org-6", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-1-c3924d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-1-c3924d.json new file mode 100644 index 000000000..33ccff28f --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-1-c3924d.json @@ -0,0 +1,51 @@ +{ + "id": "c3924d32-a472-4ec5-af6f-242f9529066c", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-c3924d32-a472-4ec5-af6f-242f9529066c.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:28 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4851", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC2F9:874291:5E2BCFA4" + } + }, + "uuid": "c3924d32-a472-4ec5-af6f-242f9529066c", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-user-2", + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-11-03f5d1.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-11-03f5d1.json new file mode 100644 index 000000000..403f642f7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-11-03f5d1.json @@ -0,0 +1,51 @@ +{ + "id": "03f5d1e3-0add-4dac-9f9c-48145c86cec0", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-03f5d1e3-0add-4dac-9f9c-48145c86cec0.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:31 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4841", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC352:8742F9:5E2BCFA7" + } + }, + "uuid": "03f5d1e3-0add-4dac-9f9c-48145c86cec0", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-5", + "newScenarioState": "scenario-1-user-6", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-14-d81fbd.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-14-d81fbd.json new file mode 100644 index 000000000..7c431ed30 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-14-d81fbd.json @@ -0,0 +1,50 @@ +{ + "id": "d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:32 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4838", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC375:874321:5E2BCFA8" + } + }, + "uuid": "d81fbdd1-40ad-4b9e-b3a1-80d3b86455a2", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-6", + "insertionIndex": 14 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-4-816c95.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-4-816c95.json new file mode 100644 index 000000000..fc57e2f20 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-4-816c95.json @@ -0,0 +1,51 @@ +{ + "id": "816c95a5-01d4-42ab-91cf-bd308ca9780b", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-816c95a5-01d4-42ab-91cf-bd308ca9780b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4848", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC311:8742AB:5E2BCFA5" + } + }, + "uuid": "816c95a5-01d4-42ab-91cf-bd308ca9780b", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-2", + "newScenarioState": "scenario-1-user-3", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-6-28c110.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-6-28c110.json new file mode 100644 index 000000000..5fe1ef671 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-6-28c110.json @@ -0,0 +1,51 @@ +{ + "id": "28c110e8-5558-4fc4-aee4-e5df36b88ce7", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-28c110e8-5558-4fc4-aee4-e5df36b88ce7.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:29 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4846", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC321:8742BC:5E2BCFA5" + } + }, + "uuid": "28c110e8-5558-4fc4-aee4-e5df36b88ce7", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-3", + "newScenarioState": "scenario-1-user-4", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-9-6e140e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-9-6e140e.json new file mode 100644 index 000000000..428e048e7 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeConnectionExceptions/mappings/user-9-6e140e.json @@ -0,0 +1,51 @@ +{ + "id": "6e140e39-8c0e-41ef-83be-438d573acced", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-6e140e39-8c0e-41ef-83be-438d573acced.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:30 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4843", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEE5:85F1:6FC343:8742E7:5E2BCFA6" + } + }, + "uuid": "6e140e39-8c0e-41ef-83be-438d573acced", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-4", + "newScenarioState": "scenario-1-user-5", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-b23279af-42c2-47ec-8cd5-d0e539893e37.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-b23279af-42c2-47ec-8cd5-d0e539893e37.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-b23279af-42c2-47ec-8cd5-d0e539893e37.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-c4f47d35-3379-4ed9-ab34-8cf9d6bdf278.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-c4f47d35-3379-4ed9-ab34-8cf9d6bdf278.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/orgs_github-api-test-org-c4f47d35-3379-4ed9-ab34-8cf9d6bdf278.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-6e1f2378-989b-4c01-942b-1dbe62c37828.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-6e1f2378-989b-4c01-942b-1dbe62c37828.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-6e1f2378-989b-4c01-942b-1dbe62c37828.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-ec7ea0b8-43cf-453d-93f3-3a95646e5e49.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-ec7ea0b8-43cf-453d-93f3-3a95646e5e49.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/__files/user-ec7ea0b8-43cf-453d-93f3-3a95646e5e49.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-2-c4f47d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-2-c4f47d.json new file mode 100644 index 000000000..afbda24de --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-2-c4f47d.json @@ -0,0 +1,51 @@ +{ + "id": "c4f47d35-3379-4ed9-ab34-8cf9d6bdf278", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-c4f47d35-3379-4ed9-ab34-8cf9d6bdf278.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4885", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEB5:19C3:CCCEB0:F75891:5E2BCF9B" + } + }, + "uuid": "c4f47d35-3379-4ed9-ab34-8cf9d6bdf278", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-orgs-github-api-test-org-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-4-b23279.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-4-b23279.json new file mode 100644 index 000000000..99beefd92 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/orgs_github-api-test-org-4-b23279.json @@ -0,0 +1,50 @@ +{ + "id": "b23279af-42c2-47ec-8cd5-d0e539893e37", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-b23279af-42c2-47ec-8cd5-d0e539893e37.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4883", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEB5:19C3:CCCEC3:F758AC:5E2BCF9C" + } + }, + "uuid": "b23279af-42c2-47ec-8cd5-d0e539893e37", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-2", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-1-6e1f23.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-1-6e1f23.json new file mode 100644 index 000000000..09b953f41 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-1-6e1f23.json @@ -0,0 +1,51 @@ +{ + "id": "6e1f2378-989b-4c01-942b-1dbe62c37828", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-6e1f2378-989b-4c01-942b-1dbe62c37828.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:19 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4886", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEB5:19C3:CCCE98:F75886:5E2BCF9B" + } + }, + "uuid": "6e1f2378-989b-4c01-942b-1dbe62c37828", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-user-2", + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-3-ec7ea0.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-3-ec7ea0.json new file mode 100644 index 000000000..641a95594 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseCodeFailureExceptions/mappings/user-3-ec7ea0.json @@ -0,0 +1,50 @@ +{ + "id": "ec7ea0b8-43cf-453d-93f3-3a95646e5e49", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-ec7ea0b8-43cf-453d-93f3-3a95646e5e49.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:20 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4884", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEB5:19C3:CCCEB9:F758A3:5E2BCF9B" + } + }, + "uuid": "ec7ea0b8-43cf-453d-93f3-3a95646e5e49", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-2", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-10f96df6-c6af-4950-a92c-13267e0cace2.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-10f96df6-c6af-4950-a92c-13267e0cace2.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-10f96df6-c6af-4950-a92c-13267e0cace2.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-1e73c802-dec7-4d03-abf3-739d844fa259.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-1e73c802-dec7-4d03-abf3-739d844fa259.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-1e73c802-dec7-4d03-abf3-739d844fa259.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-229fe715-52b4-486e-8fc3-9c9a7913eebb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-229fe715-52b4-486e-8fc3-9c9a7913eebb.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-229fe715-52b4-486e-8fc3-9c9a7913eebb.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-26dd1c3f-3554-429a-8bf0-e59aebacf0b8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-26dd1c3f-3554-429a-8bf0-e59aebacf0b8.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-26dd1c3f-3554-429a-8bf0-e59aebacf0b8.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-302e6791-7c2a-4f21-bca8-1f25648f9e56.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-302e6791-7c2a-4f21-bca8-1f25648f9e56.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-302e6791-7c2a-4f21-bca8-1f25648f9e56.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-4ca300e6-0095-461e-bf05-fb7b4bc4c5cb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-4ca300e6-0095-461e-bf05-fb7b4bc4c5cb.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-4ca300e6-0095-461e-bf05-fb7b4bc4c5cb.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-5f714f0b-2508-4b9a-bc12-3b444d31344e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-5f714f0b-2508-4b9a-bc12-3b444d31344e.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-5f714f0b-2508-4b9a-bc12-3b444d31344e.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-626d1c87-e379-40d9-9f96-e30b809047ad.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-626d1c87-e379-40d9-9f96-e30b809047ad.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-626d1c87-e379-40d9-9f96-e30b809047ad.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-72e3d445-a8d2-4dfc-8995-15588eaa8559.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-72e3d445-a8d2-4dfc-8995-15588eaa8559.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-72e3d445-a8d2-4dfc-8995-15588eaa8559.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-76d63462-3714-4553-9faa-07f1566d4ca6.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-76d63462-3714-4553-9faa-07f1566d4ca6.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-76d63462-3714-4553-9faa-07f1566d4ca6.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-7eb4a14c-2021-4a25-864a-6dcc05bea36b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-7eb4a14c-2021-4a25-864a-6dcc05bea36b.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-7eb4a14c-2021-4a25-864a-6dcc05bea36b.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-90c537d6-609a-4714-a7e4-aeb09ae51329.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-90c537d6-609a-4714-a7e4-aeb09ae51329.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-90c537d6-609a-4714-a7e4-aeb09ae51329.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-996e79f3-7094-4304-8350-4ef0968acc1d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-996e79f3-7094-4304-8350-4ef0968acc1d.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-996e79f3-7094-4304-8350-4ef0968acc1d.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-9a73bc8d-0ffc-40fb-8afc-427f3782f49f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-9a73bc8d-0ffc-40fb-8afc-427f3782f49f.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-9a73bc8d-0ffc-40fb-8afc-427f3782f49f.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-a7cd84d4-2802-429d-8469-a30261402465.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-a7cd84d4-2802-429d-8469-a30261402465.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-a7cd84d4-2802-429d-8469-a30261402465.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-baf03b59-f496-44d1-9349-08496c54d4e9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-baf03b59-f496-44d1-9349-08496c54d4e9.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-baf03b59-f496-44d1-9349-08496c54d4e9.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-c3886ce7-8d89-4c42-9762-f7550cc98419.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-c3886ce7-8d89-4c42-9762-f7550cc98419.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-c3886ce7-8d89-4c42-9762-f7550cc98419.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-d54a6c1c-5ccb-4547-bf78-268eb1c1610b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-d54a6c1c-5ccb-4547-bf78-268eb1c1610b.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-d54a6c1c-5ccb-4547-bf78-268eb1c1610b.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-de06f65f-c0ac-4429-8c28-78e371718030.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-de06f65f-c0ac-4429-8c28-78e371718030.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-de06f65f-c0ac-4429-8c28-78e371718030.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e04b4abf-8e2a-4c40-a511-ee62af5c5f15.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e04b4abf-8e2a-4c40-a511-ee62af5c5f15.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e04b4abf-8e2a-4c40-a511-ee62af5c5f15.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e72d15dc-ba19-4d0a-bdda-d03b757b6ee8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e72d15dc-ba19-4d0a-bdda-d03b757b6ee8.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-e72d15dc-ba19-4d0a-bdda-d03b757b6ee8.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-ee35eb0c-fbc5-45db-9f1c-40b9d3013f39.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-ee35eb0c-fbc5-45db-9f1c-40b9d3013f39.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-ee35eb0c-fbc5-45db-9f1c-40b9d3013f39.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f325867d-06a1-4980-9097-a3eddbc11278.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f325867d-06a1-4980-9097-a3eddbc11278.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f325867d-06a1-4980-9097-a3eddbc11278.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f6bc0d28-364d-4450-a6b9-83478df3236d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f6bc0d28-364d-4450-a6b9-83478df3236d.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-f6bc0d28-364d-4450-a6b9-83478df3236d.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-fe3425b6-8391-46b5-92bf-9b712f8a84fe.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-fe3425b6-8391-46b5-92bf-9b712f8a84fe.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/orgs_github-api-test-org-fe3425b6-8391-46b5-92bf-9b712f8a84fe.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-17b29022-6e68-4cdc-9c1d-0b760d4adf82.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-17b29022-6e68-4cdc-9c1d-0b760d4adf82.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-17b29022-6e68-4cdc-9c1d-0b760d4adf82.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-2acbc95d-1316-459c-91ff-586eda85f4ec.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-2acbc95d-1316-459c-91ff-586eda85f4ec.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-2acbc95d-1316-459c-91ff-586eda85f4ec.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-347ca8e8-1649-4482-8510-092cc69e5141.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-347ca8e8-1649-4482-8510-092cc69e5141.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-347ca8e8-1649-4482-8510-092cc69e5141.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-799b0193-8353-4eb5-8233-249195449c88.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-799b0193-8353-4eb5-8233-249195449c88.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-799b0193-8353-4eb5-8233-249195449c88.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-ce11cb82-1514-46af-b020-373c970f414a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-ce11cb82-1514-46af-b020-373c970f414a.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-ce11cb82-1514-46af-b020-373c970f414a.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-f36dc045-47cf-4f69-b888-844f3d00e12a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-f36dc045-47cf-4f69-b888-844f3d00e12a.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/__files/user-f36dc045-47cf-4f69-b888-844f3d00e12a.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-10-de06f6.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-10-de06f6.json new file mode 100644 index 000000000..5a2d25a44 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-10-de06f6.json @@ -0,0 +1,51 @@ +{ + "id": "de06f65f-c0ac-4429-8c28-78e371718030", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-de06f65f-c0ac-4429-8c28-78e371718030.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4826", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5485:E30C1F:5E2BCFAB" + } + }, + "uuid": "de06f65f-c0ac-4429-8c28-78e371718030", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-8", + "newScenarioState": "scenario-2-orgs-github-api-test-org-9", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-11-baf03b.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-11-baf03b.json new file mode 100644 index 000000000..a59cd9e0a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-11-baf03b.json @@ -0,0 +1,51 @@ +{ + "id": "baf03b59-f496-44d1-9349-08496c54d4e9", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-baf03b59-f496-44d1-9349-08496c54d4e9.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4825", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5495:E30C33:5E2BCFAB" + } + }, + "uuid": "baf03b59-f496-44d1-9349-08496c54d4e9", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-9", + "newScenarioState": "scenario-2-orgs-github-api-test-org-10", + "insertionIndex": 11 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-13-d54a6c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-13-d54a6c.json new file mode 100644 index 000000000..605f6f6da --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-13-d54a6c.json @@ -0,0 +1,51 @@ +{ + "id": "d54a6c1c-5ccb-4547-bf78-268eb1c1610b", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-d54a6c1c-5ccb-4547-bf78-268eb1c1610b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4823", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54AD:E30C54:5E2BCFAC" + } + }, + "uuid": "d54a6c1c-5ccb-4547-bf78-268eb1c1610b", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-10", + "newScenarioState": "scenario-2-orgs-github-api-test-org-11", + "insertionIndex": 13 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-14-5f714f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-14-5f714f.json new file mode 100644 index 000000000..41d8f9c13 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-14-5f714f.json @@ -0,0 +1,51 @@ +{ + "id": "5f714f0b-2508-4b9a-bc12-3b444d31344e", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5f714f0b-2508-4b9a-bc12-3b444d31344e.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4822", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54C0:E30C62:5E2BCFAC" + } + }, + "uuid": "5f714f0b-2508-4b9a-bc12-3b444d31344e", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-11", + "newScenarioState": "scenario-2-orgs-github-api-test-org-12", + "insertionIndex": 14 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-15-90c537.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-15-90c537.json new file mode 100644 index 000000000..fa24d7485 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-15-90c537.json @@ -0,0 +1,51 @@ +{ + "id": "90c537d6-609a-4714-a7e4-aeb09ae51329", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-90c537d6-609a-4714-a7e4-aeb09ae51329.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4821", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54CC:E30C71:5E2BCFAC" + } + }, + "uuid": "90c537d6-609a-4714-a7e4-aeb09ae51329", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-12", + "newScenarioState": "scenario-2-orgs-github-api-test-org-13", + "insertionIndex": 15 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-16-1e73c8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-16-1e73c8.json new file mode 100644 index 000000000..355611557 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-16-1e73c8.json @@ -0,0 +1,51 @@ +{ + "id": "1e73c802-dec7-4d03-abf3-739d844fa259", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-1e73c802-dec7-4d03-abf3-739d844fa259.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4820", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54D6:E30C80:5E2BCFAC" + } + }, + "uuid": "1e73c802-dec7-4d03-abf3-739d844fa259", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-13", + "newScenarioState": "scenario-2-orgs-github-api-test-org-14", + "insertionIndex": 16 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-17-7eb4a1.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-17-7eb4a1.json new file mode 100644 index 000000000..0e091a38c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-17-7eb4a1.json @@ -0,0 +1,51 @@ +{ + "id": "7eb4a14c-2021-4a25-864a-6dcc05bea36b", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-7eb4a14c-2021-4a25-864a-6dcc05bea36b.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4819", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54E6:E30C8E:5E2BCFAD" + } + }, + "uuid": "7eb4a14c-2021-4a25-864a-6dcc05bea36b", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-14", + "newScenarioState": "scenario-2-orgs-github-api-test-org-15", + "insertionIndex": 17 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-18-8d0b20.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-18-8d0b20.json new file mode 100644 index 000000000..17b535ce3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-18-8d0b20.json @@ -0,0 +1,51 @@ +{ + "id": "8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4818", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54F7:E30CA1:5E2BCFAD" + } + }, + "uuid": "8d0b20a7-3166-4c85-a4bc-c8c73b4d46d5", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-15", + "newScenarioState": "scenario-2-orgs-github-api-test-org-16", + "insertionIndex": 18 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-2-996e79.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-2-996e79.json new file mode 100644 index 000000000..4c4432ae9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-2-996e79.json @@ -0,0 +1,51 @@ +{ + "id": "996e79f3-7094-4304-8350-4ef0968acc1d", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-996e79f3-7094-4304-8350-4ef0968acc1d.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4834", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5420:E30BAA:5E2BCFA9" + } + }, + "uuid": "996e79f3-7094-4304-8350-4ef0968acc1d", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-2-orgs-github-api-test-org-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-20-e04b4a.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-20-e04b4a.json new file mode 100644 index 000000000..d74258896 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-20-e04b4a.json @@ -0,0 +1,51 @@ +{ + "id": "e04b4abf-8e2a-4c40-a511-ee62af5c5f15", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-e04b4abf-8e2a-4c40-a511-ee62af5c5f15.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4816", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB550C:E30CC0:5E2BCFAD" + } + }, + "uuid": "e04b4abf-8e2a-4c40-a511-ee62af5c5f15", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-16", + "newScenarioState": "scenario-2-orgs-github-api-test-org-17", + "insertionIndex": 20 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-21-26dd1c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-21-26dd1c.json new file mode 100644 index 000000000..5d7c67c72 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-21-26dd1c.json @@ -0,0 +1,51 @@ +{ + "id": "26dd1c3f-3554-429a-8bf0-e59aebacf0b8", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-26dd1c3f-3554-429a-8bf0-e59aebacf0b8.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4815", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5520:E30CCF:5E2BCFAD" + } + }, + "uuid": "26dd1c3f-3554-429a-8bf0-e59aebacf0b8", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-17", + "newScenarioState": "scenario-2-orgs-github-api-test-org-18", + "insertionIndex": 21 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-22-fe3425.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-22-fe3425.json new file mode 100644 index 000000000..16c91dbaa --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-22-fe3425.json @@ -0,0 +1,51 @@ +{ + "id": "fe3425b6-8391-46b5-92bf-9b712f8a84fe", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-fe3425b6-8391-46b5-92bf-9b712f8a84fe.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4814", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5531:E30CE5:5E2BCFAE" + } + }, + "uuid": "fe3425b6-8391-46b5-92bf-9b712f8a84fe", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-18", + "newScenarioState": "scenario-2-orgs-github-api-test-org-19", + "insertionIndex": 22 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-24-302e67.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-24-302e67.json new file mode 100644 index 000000000..42e6b96e3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-24-302e67.json @@ -0,0 +1,51 @@ +{ + "id": "302e6791-7c2a-4f21-bca8-1f25648f9e56", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-302e6791-7c2a-4f21-bca8-1f25648f9e56.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4812", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5542:E30D02:5E2BCFAE" + } + }, + "uuid": "302e6791-7c2a-4f21-bca8-1f25648f9e56", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-19", + "newScenarioState": "scenario-2-orgs-github-api-test-org-20", + "insertionIndex": 24 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-25-a7cd84.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-25-a7cd84.json new file mode 100644 index 000000000..86cdf78cb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-25-a7cd84.json @@ -0,0 +1,51 @@ +{ + "id": "a7cd84d4-2802-429d-8469-a30261402465", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-a7cd84d4-2802-429d-8469-a30261402465.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4811", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5552:E30D0C:5E2BCFAE" + } + }, + "uuid": "a7cd84d4-2802-429d-8469-a30261402465", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-20", + "newScenarioState": "scenario-2-orgs-github-api-test-org-21", + "insertionIndex": 25 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-26-f32586.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-26-f32586.json new file mode 100644 index 000000000..47bc73c42 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-26-f32586.json @@ -0,0 +1,51 @@ +{ + "id": "f325867d-06a1-4980-9097-a3eddbc11278", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-f325867d-06a1-4980-9097-a3eddbc11278.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4810", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5561:E30D24:5E2BCFAF" + } + }, + "uuid": "f325867d-06a1-4980-9097-a3eddbc11278", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-21", + "newScenarioState": "scenario-2-orgs-github-api-test-org-22", + "insertionIndex": 26 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-27-4ca300.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-27-4ca300.json new file mode 100644 index 000000000..118aa6680 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-27-4ca300.json @@ -0,0 +1,51 @@ +{ + "id": "4ca300e6-0095-461e-bf05-fb7b4bc4c5cb", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-4ca300e6-0095-461e-bf05-fb7b4bc4c5cb.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:39 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4809", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5571:E30D35:5E2BCFAF" + } + }, + "uuid": "4ca300e6-0095-461e-bf05-fb7b4bc4c5cb", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-22", + "newScenarioState": "scenario-2-orgs-github-api-test-org-23", + "insertionIndex": 27 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-28-76d634.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-28-76d634.json new file mode 100644 index 000000000..0a01ae9d1 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-28-76d634.json @@ -0,0 +1,53 @@ +{ + "id": "76d63462-3714-4553-9faa-07f1566d4ca6", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-76d63462-3714-4553-9faa-07f1566d4ca6.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4808", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding", + "Accept-Encoding", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB557E:E30D46:5E2BCFAF" + } + }, + "uuid": "76d63462-3714-4553-9faa-07f1566d4ca6", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-23", + "newScenarioState": "scenario-2-orgs-github-api-test-org-24", + "insertionIndex": 28 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-29-626d1c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-29-626d1c.json new file mode 100644 index 000000000..bfcd14877 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-29-626d1c.json @@ -0,0 +1,51 @@ +{ + "id": "626d1c87-e379-40d9-9f96-e30b809047ad", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-626d1c87-e379-40d9-9f96-e30b809047ad.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4807", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB559B:E30D5F:5E2BCFB0" + } + }, + "uuid": "626d1c87-e379-40d9-9f96-e30b809047ad", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-24", + "newScenarioState": "scenario-2-orgs-github-api-test-org-25", + "insertionIndex": 29 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-3-ee35eb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-3-ee35eb.json new file mode 100644 index 000000000..4c4c2205b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-3-ee35eb.json @@ -0,0 +1,51 @@ +{ + "id": "ee35eb0c-fbc5-45db-9f1c-40b9d3013f39", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-ee35eb0c-fbc5-45db-9f1c-40b9d3013f39.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4833", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB542C:E30BB5:5E2BCFA9" + } + }, + "uuid": "ee35eb0c-fbc5-45db-9f1c-40b9d3013f39", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-2", + "newScenarioState": "scenario-2-orgs-github-api-test-org-3", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-31-f6bc0d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-31-f6bc0d.json new file mode 100644 index 000000000..8d67b72fb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-31-f6bc0d.json @@ -0,0 +1,51 @@ +{ + "id": "f6bc0d28-364d-4450-a6b9-83478df3236d", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-f6bc0d28-364d-4450-a6b9-83478df3236d.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4805", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB55B1:E30D83:5E2BCFB0" + } + }, + "uuid": "f6bc0d28-364d-4450-a6b9-83478df3236d", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-25", + "newScenarioState": "scenario-2-orgs-github-api-test-org-26", + "insertionIndex": 31 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-32-10f96d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-32-10f96d.json new file mode 100644 index 000000000..b54d2762e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-32-10f96d.json @@ -0,0 +1,51 @@ +{ + "id": "10f96df6-c6af-4950-a92c-13267e0cace2", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-10f96df6-c6af-4950-a92c-13267e0cace2.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:41 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4804", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB55BA:E30D8B:5E2BCFB0" + } + }, + "uuid": "10f96df6-c6af-4950-a92c-13267e0cace2", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-26", + "newScenarioState": "scenario-2-orgs-github-api-test-org-27", + "insertionIndex": 32 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-33-9a73bc.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-33-9a73bc.json new file mode 100644 index 000000000..987fa240d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-33-9a73bc.json @@ -0,0 +1,50 @@ +{ + "id": "9a73bc8d-0ffc-40fb-8afc-427f3782f49f", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-9a73bc8d-0ffc-40fb-8afc-427f3782f49f.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:41 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4803", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB55C9:E30D9B:5E2BCFB1" + } + }, + "uuid": "9a73bc8d-0ffc-40fb-8afc-427f3782f49f", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-27", + "insertionIndex": 33 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-4-e72d15.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-4-e72d15.json new file mode 100644 index 000000000..fcf383092 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-4-e72d15.json @@ -0,0 +1,51 @@ +{ + "id": "e72d15dc-ba19-4d0a-bdda-d03b757b6ee8", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-e72d15dc-ba19-4d0a-bdda-d03b757b6ee8.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4832", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB543A:E30BC2:5E2BCFA9" + } + }, + "uuid": "e72d15dc-ba19-4d0a-bdda-d03b757b6ee8", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-3", + "newScenarioState": "scenario-2-orgs-github-api-test-org-4", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-5-c3886c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-5-c3886c.json new file mode 100644 index 000000000..c50a59230 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-5-c3886c.json @@ -0,0 +1,51 @@ +{ + "id": "c3886ce7-8d89-4c42-9762-f7550cc98419", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-c3886ce7-8d89-4c42-9762-f7550cc98419.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4831", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5442:E30BD5:5E2BCFAA" + } + }, + "uuid": "c3886ce7-8d89-4c42-9762-f7550cc98419", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-4", + "newScenarioState": "scenario-2-orgs-github-api-test-org-5", + "insertionIndex": 5 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-6-2c2f60.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-6-2c2f60.json new file mode 100644 index 000000000..3537dc39d --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-6-2c2f60.json @@ -0,0 +1,51 @@ +{ + "id": "2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4830", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5457:E30BE8:5E2BCFAA" + } + }, + "uuid": "2c2f6059-ce6d-4ead-a0a6-bb3fc42ec07e", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-5", + "newScenarioState": "scenario-2-orgs-github-api-test-org-6", + "insertionIndex": 6 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-7-72e3d4.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-7-72e3d4.json new file mode 100644 index 000000000..a85eec250 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-7-72e3d4.json @@ -0,0 +1,51 @@ +{ + "id": "72e3d445-a8d2-4dfc-8995-15588eaa8559", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-72e3d445-a8d2-4dfc-8995-15588eaa8559.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:34 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4829", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5468:E30BFD:5E2BCFAA" + } + }, + "uuid": "72e3d445-a8d2-4dfc-8995-15588eaa8559", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-6", + "newScenarioState": "scenario-2-orgs-github-api-test-org-7", + "insertionIndex": 7 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-9-229fe7.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-9-229fe7.json new file mode 100644 index 000000000..33849f80b --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/orgs_github-api-test-org-9-229fe7.json @@ -0,0 +1,51 @@ +{ + "id": "229fe715-52b4-486e-8fc3-9c9a7913eebb", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-229fe715-52b4-486e-8fc3-9c9a7913eebb.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4827", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5476:E30C14:5E2BCFAB" + } + }, + "uuid": "229fe715-52b4-486e-8fc3-9c9a7913eebb", + "persistent": true, + "scenarioName": "scenario-2-orgs-github-api-test-org", + "requiredScenarioState": "scenario-2-orgs-github-api-test-org-7", + "newScenarioState": "scenario-2-orgs-github-api-test-org-8", + "insertionIndex": 9 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-1-2acbc9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-1-2acbc9.json new file mode 100644 index 000000000..7ea3dc891 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-1-2acbc9.json @@ -0,0 +1,51 @@ +{ + "id": "2acbc95d-1316-459c-91ff-586eda85f4ec", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-2acbc95d-1316-459c-91ff-586eda85f4ec.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:33 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4835", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5415:E30BA1:5E2BCFA9" + } + }, + "uuid": "2acbc95d-1316-459c-91ff-586eda85f4ec", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-user-2", + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-12-ce11cb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-12-ce11cb.json new file mode 100644 index 000000000..8c8345f6c --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-12-ce11cb.json @@ -0,0 +1,51 @@ +{ + "id": "ce11cb82-1514-46af-b020-373c970f414a", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-ce11cb82-1514-46af-b020-373c970f414a.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:36 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4824", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB54A3:E30C4C:5E2BCFAB" + } + }, + "uuid": "ce11cb82-1514-46af-b020-373c970f414a", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-3", + "newScenarioState": "scenario-1-user-4", + "insertionIndex": 12 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-19-799b01.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-19-799b01.json new file mode 100644 index 000000000..9c78ff32a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-19-799b01.json @@ -0,0 +1,51 @@ +{ + "id": "799b0193-8353-4eb5-8233-249195449c88", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-799b0193-8353-4eb5-8233-249195449c88.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:37 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4817", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB5501:E30CB0:5E2BCFAD" + } + }, + "uuid": "799b0193-8353-4eb5-8233-249195449c88", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-4", + "newScenarioState": "scenario-1-user-5", + "insertionIndex": 19 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-23-17b290.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-23-17b290.json new file mode 100644 index 000000000..cb90be870 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-23-17b290.json @@ -0,0 +1,51 @@ +{ + "id": "17b29022-6e68-4cdc-9c1d-0b760d4adf82", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-17b29022-6e68-4cdc-9c1d-0b760d4adf82.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:38 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4813", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB553F:E30CF9:5E2BCFAE" + } + }, + "uuid": "17b29022-6e68-4cdc-9c1d-0b760d4adf82", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-5", + "newScenarioState": "scenario-1-user-6", + "insertionIndex": 23 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-30-347ca8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-30-347ca8.json new file mode 100644 index 000000000..e5d930c56 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-30-347ca8.json @@ -0,0 +1,50 @@ +{ + "id": "347ca8e8-1649-4482-8510-092cc69e5141", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-347ca8e8-1649-4482-8510-092cc69e5141.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:40 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4806", + "X-RateLimit-Reset": "1579932373", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB55A6:E30D78:5E2BCFB0" + } + }, + "uuid": "347ca8e8-1649-4482-8510-092cc69e5141", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-6", + "insertionIndex": 30 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-8-f36dc0.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-8-f36dc0.json new file mode 100644 index 000000000..78c9fc0e6 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testResponseMessageConnectionExceptions/mappings/user-8-f36dc0.json @@ -0,0 +1,51 @@ +{ + "id": "f36dc045-47cf-4f69-b888-844f3d00e12a", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-f36dc045-47cf-4f69-b888-844f3d00e12a.json", + "headers": { + "Date": "Sat, 25 Jan 2020 05:18:35 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4828", + "X-RateLimit-Reset": "1579932374", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "FEEE:1B3E:BB546D:E30C0C:5E2BCFAA" + } + }, + "uuid": "f36dc045-47cf-4f69-b888-844f3d00e12a", + "persistent": true, + "scenarioName": "scenario-1-user", + "requiredScenarioState": "scenario-1-user-2", + "newScenarioState": "scenario-1-user-3", + "insertionIndex": 8 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json new file mode 100644 index 000000000..add01c1b3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json @@ -0,0 +1,42 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 9, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 3, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json new file mode 100644 index 000000000..4ae55dacd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json @@ -0,0 +1,330 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "github-api-test-org/github-api", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/github-api", + "description": "Tricky", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/github-api", + "forks_url": "https://api.github.com/repos/github-api-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2019-09-25T23:37:07Z", + "pushed_at": "2019-09-26T00:06:54Z", + "git_url": "git://github.com/github-api-test-org/github-api.git", + "ssh_url": "git@github.com:github-api-test-org/github-api.git", + "clone_url": "https://github.com/github-api-test-org/github-api.git", + "svn_url": "https://github.com/github-api-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11387, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "network_count": 427, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json new file mode 100644 index 000000000..f1510deac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json @@ -0,0 +1,95 @@ +{ + "name": "test/timeout", + "commit": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOjE0ZmEzNjk4MjIxZjkxNjEzYjllMWQ4MDk0MzQzMjZlNWVkNTQ2YWY=", + "commit": { + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-06T23:38:04Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-07T00:09:09Z" + }, + "message": "Update README", + "tree": { + "sha": "f791b2c2752a83ddd7604a800800b18e7c1d0196", + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees/f791b2c2752a83ddd7604a800800b18e7c1d0196" + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "html_url": "https://github.com/github-api-test-org/github-api/commit/14fa3698221f91613b9e1d809434326e5ed546af", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af/comments", + "author": { + "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 + }, + "committer": { + "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 + }, + "parents": [ + { + "sha": "3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "html_url": "https://github.com/github-api-test-org/github-api/commit/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode", + "html": "https://github.com/github-api-test-org/github-api/tree/test/#UrlEncode" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [] + } + }, + "protection_url": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode/protection" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json new file mode 100644 index 000000000..eab16ea06 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json @@ -0,0 +1,33 @@ +{ + "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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 166, + "public_gists": 4, + "followers": 135, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-09-24T19:32:29Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/orgs_github-api-test-org-2-5e8ae8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/orgs_github-api-test-org-2-5e8ae8.json new file mode 100644 index 000000000..6383a4eae --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/orgs_github-api-test-org-2-5e8ae8.json @@ -0,0 +1,48 @@ +{ + "id": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4992", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"b7989d48e6539c9c76038995b902421b\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DB:2A314B:5D8C0218" + } + }, + "uuid": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api-3-30364e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api-3-30364e.json new file mode 100644 index 000000000..dda61603a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api-3-30364e.json @@ -0,0 +1,48 @@ +{ + "id": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "name": "repos_github-api-test-org_github-api", + "request": { + "url": "/repos/github-api-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"afa5bdcd11463905460dc32b4cbac3ba\"", + "Last-Modified": "Wed, 25 Sep 2019 23:37:07 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DE:2A315A:5D8C0218" + } + }, + "uuid": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json new file mode 100644 index 000000000..5d24c0f05 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json @@ -0,0 +1,47 @@ +{ + "id": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "name": "repos_github-api-test-org_github-api_branches_test_timeout", + "request": { + "url": "/repos/github-api-test-org/github-api/branches/test/timeout", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4990", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"70021000b4de67768f66b57bbeead27c\"", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322E4:2A3160:5D8C0219" + } + }, + "uuid": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/user-1-c92cdb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/user-1-c92cdb.json new file mode 100644 index 000000000..70c3d2211 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry/mappings/user-1-c92cdb.json @@ -0,0 +1,48 @@ +{ + "id": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4994", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"14ffd29009ddc2209c450bb29a5a8330\"", + "Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322CA:2A3143:5D8C0218" + } + }, + "uuid": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json new file mode 100644 index 000000000..add01c1b3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json @@ -0,0 +1,42 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 9, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 3, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json new file mode 100644 index 000000000..4ae55dacd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json @@ -0,0 +1,330 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "github-api-test-org/github-api", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/github-api", + "description": "Tricky", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/github-api", + "forks_url": "https://api.github.com/repos/github-api-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2019-09-25T23:37:07Z", + "pushed_at": "2019-09-26T00:06:54Z", + "git_url": "git://github.com/github-api-test-org/github-api.git", + "ssh_url": "git@github.com:github-api-test-org/github-api.git", + "clone_url": "https://github.com/github-api-test-org/github-api.git", + "svn_url": "https://github.com/github-api-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11387, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "network_count": 427, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json new file mode 100644 index 000000000..f1510deac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json @@ -0,0 +1,95 @@ +{ + "name": "test/timeout", + "commit": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOjE0ZmEzNjk4MjIxZjkxNjEzYjllMWQ4MDk0MzQzMjZlNWVkNTQ2YWY=", + "commit": { + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-06T23:38:04Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-07T00:09:09Z" + }, + "message": "Update README", + "tree": { + "sha": "f791b2c2752a83ddd7604a800800b18e7c1d0196", + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees/f791b2c2752a83ddd7604a800800b18e7c1d0196" + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "html_url": "https://github.com/github-api-test-org/github-api/commit/14fa3698221f91613b9e1d809434326e5ed546af", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af/comments", + "author": { + "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 + }, + "committer": { + "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 + }, + "parents": [ + { + "sha": "3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "html_url": "https://github.com/github-api-test-org/github-api/commit/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode", + "html": "https://github.com/github-api-test-org/github-api/tree/test/#UrlEncode" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [] + } + }, + "protection_url": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode/protection" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json new file mode 100644 index 000000000..eab16ea06 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json @@ -0,0 +1,33 @@ +{ + "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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 166, + "public_gists": 4, + "followers": 135, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-09-24T19:32:29Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/orgs_github-api-test-org-2-5e8ae8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/orgs_github-api-test-org-2-5e8ae8.json new file mode 100644 index 000000000..6383a4eae --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/orgs_github-api-test-org-2-5e8ae8.json @@ -0,0 +1,48 @@ +{ + "id": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4992", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"b7989d48e6539c9c76038995b902421b\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DB:2A314B:5D8C0218" + } + }, + "uuid": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api-3-30364e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api-3-30364e.json new file mode 100644 index 000000000..dda61603a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api-3-30364e.json @@ -0,0 +1,48 @@ +{ + "id": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "name": "repos_github-api-test-org_github-api", + "request": { + "url": "/repos/github-api-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"afa5bdcd11463905460dc32b4cbac3ba\"", + "Last-Modified": "Wed, 25 Sep 2019 23:37:07 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DE:2A315A:5D8C0218" + } + }, + "uuid": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json new file mode 100644 index 000000000..5d24c0f05 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json @@ -0,0 +1,47 @@ +{ + "id": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "name": "repos_github-api-test-org_github-api_branches_test_timeout", + "request": { + "url": "/repos/github-api-test-org/github-api/branches/test/timeout", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4990", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"70021000b4de67768f66b57bbeead27c\"", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322E4:2A3160:5D8C0219" + } + }, + "uuid": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/user-1-c92cdb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/user-1-c92cdb.json new file mode 100644 index 000000000..70c3d2211 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_StatusCode/mappings/user-1-c92cdb.json @@ -0,0 +1,48 @@ +{ + "id": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4994", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"14ffd29009ddc2209c450bb29a5a8330\"", + "Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322CA:2A3143:5D8C0218" + } + }, + "uuid": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json new file mode 100644 index 000000000..add01c1b3 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json @@ -0,0 +1,42 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 9, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 132, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "members_allowed_repository_creation_type": "none", + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 3, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json new file mode 100644 index 000000000..4ae55dacd --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json @@ -0,0 +1,330 @@ +{ + "id": 206888201, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY4ODgyMDE=", + "name": "github-api", + "full_name": "github-api-test-org/github-api", + "private": false, + "owner": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api-test-org/github-api", + "description": "Tricky", + "fork": true, + "url": "https://api.github.com/repos/github-api-test-org/github-api", + "forks_url": "https://api.github.com/repos/github-api-test-org/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api-test-org/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api-test-org/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api-test-org/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api-test-org/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api-test-org/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api-test-org/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api-test-org/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api-test-org/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api-test-org/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api-test-org/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api-test-org/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api-test-org/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api-test-org/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api-test-org/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api-test-org/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api-test-org/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api-test-org/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api-test-org/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api-test-org/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api-test-org/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api-test-org/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api-test-org/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api-test-org/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api-test-org/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api-test-org/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api-test-org/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api-test-org/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api-test-org/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api-test-org/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api-test-org/github-api/deployments", + "created_at": "2019-09-06T23:26:04Z", + "updated_at": "2019-09-25T23:37:07Z", + "pushed_at": "2019-09-26T00:06:54Z", + "git_url": "git://github.com/github-api-test-org/github-api.git", + "ssh_url": "git@github.com:github-api-test-org/github-api.git", + "clone_url": "https://github.com/github-api-test-org/github-api.git", + "svn_url": "https://github.com/github-api-test-org/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11387, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "permissions": { + "admin": true, + "push": true, + "pull": true + }, + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "organization": { + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api-test-org", + "html_url": "https://github.com/github-api-test-org", + "followers_url": "https://api.github.com/users/github-api-test-org/followers", + "following_url": "https://api.github.com/users/github-api-test-org/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api-test-org/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api-test-org/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api-test-org/subscriptions", + "organizations_url": "https://api.github.com/users/github-api-test-org/orgs", + "repos_url": "https://api.github.com/users/github-api-test-org/repos", + "events_url": "https://api.github.com/users/github-api-test-org/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api-test-org/received_events", + "type": "Organization", + "site_admin": false + }, + "parent": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "source": { + "id": 617210, + "node_id": "MDEwOlJlcG9zaXRvcnk2MTcyMTA=", + "name": "github-api", + "full_name": "github-api/github-api", + "private": false, + "owner": { + "login": "github-api", + "id": 54909825, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjU0OTA5ODI1", + "avatar_url": "https://avatars3.githubusercontent.com/u/54909825?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-api", + "html_url": "https://github.com/github-api", + "followers_url": "https://api.github.com/users/github-api/followers", + "following_url": "https://api.github.com/users/github-api/following{/other_user}", + "gists_url": "https://api.github.com/users/github-api/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-api/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-api/subscriptions", + "organizations_url": "https://api.github.com/users/github-api/orgs", + "repos_url": "https://api.github.com/users/github-api/repos", + "events_url": "https://api.github.com/users/github-api/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-api/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github-api/github-api", + "description": "Java API for GitHub", + "fork": false, + "url": "https://api.github.com/repos/github-api/github-api", + "forks_url": "https://api.github.com/repos/github-api/github-api/forks", + "keys_url": "https://api.github.com/repos/github-api/github-api/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github-api/github-api/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github-api/github-api/teams", + "hooks_url": "https://api.github.com/repos/github-api/github-api/hooks", + "issue_events_url": "https://api.github.com/repos/github-api/github-api/issues/events{/number}", + "events_url": "https://api.github.com/repos/github-api/github-api/events", + "assignees_url": "https://api.github.com/repos/github-api/github-api/assignees{/user}", + "branches_url": "https://api.github.com/repos/github-api/github-api/branches{/branch}", + "tags_url": "https://api.github.com/repos/github-api/github-api/tags", + "blobs_url": "https://api.github.com/repos/github-api/github-api/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github-api/github-api/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github-api/github-api/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github-api/github-api/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github-api/github-api/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github-api/github-api/languages", + "stargazers_url": "https://api.github.com/repos/github-api/github-api/stargazers", + "contributors_url": "https://api.github.com/repos/github-api/github-api/contributors", + "subscribers_url": "https://api.github.com/repos/github-api/github-api/subscribers", + "subscription_url": "https://api.github.com/repos/github-api/github-api/subscription", + "commits_url": "https://api.github.com/repos/github-api/github-api/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github-api/github-api/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github-api/github-api/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github-api/github-api/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github-api/github-api/contents/{+path}", + "compare_url": "https://api.github.com/repos/github-api/github-api/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github-api/github-api/merges", + "archive_url": "https://api.github.com/repos/github-api/github-api/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github-api/github-api/downloads", + "issues_url": "https://api.github.com/repos/github-api/github-api/issues{/number}", + "pulls_url": "https://api.github.com/repos/github-api/github-api/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github-api/github-api/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github-api/github-api/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github-api/github-api/labels{/name}", + "releases_url": "https://api.github.com/repos/github-api/github-api/releases{/id}", + "deployments_url": "https://api.github.com/repos/github-api/github-api/deployments", + "created_at": "2010-04-19T04:13:03Z", + "updated_at": "2019-09-25T23:55:16Z", + "pushed_at": "2019-09-26T00:00:09Z", + "git_url": "git://github.com/github-api/github-api.git", + "ssh_url": "git@github.com:github-api/github-api.git", + "clone_url": "https://github.com/github-api/github-api.git", + "svn_url": "https://github.com/github-api/github-api", + "homepage": "http://github-api.kohsuke.org/", + "size": 11660, + "stargazers_count": 553, + "watchers_count": 553, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 427, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 94, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 427, + "open_issues": 94, + "watchers": 553, + "default_branch": "master" + }, + "network_count": 427, + "subscribers_count": 0 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json new file mode 100644 index 000000000..f1510deac --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json @@ -0,0 +1,95 @@ +{ + "name": "test/timeout", + "commit": { + "sha": "14fa3698221f91613b9e1d809434326e5ed546af", + "node_id": "MDY6Q29tbWl0MjA2ODg4MjAxOjE0ZmEzNjk4MjIxZjkxNjEzYjllMWQ4MDk0MzQzMjZlNWVkNTQ2YWY=", + "commit": { + "author": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-06T23:38:04Z" + }, + "committer": { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com", + "date": "2019-09-07T00:09:09Z" + }, + "message": "Update README", + "tree": { + "sha": "f791b2c2752a83ddd7604a800800b18e7c1d0196", + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/trees/f791b2c2752a83ddd7604a800800b18e7c1d0196" + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/git/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af", + "html_url": "https://github.com/github-api-test-org/github-api/commit/14fa3698221f91613b9e1d809434326e5ed546af", + "comments_url": "https://api.github.com/repos/github-api-test-org/github-api/commits/14fa3698221f91613b9e1d809434326e5ed546af/comments", + "author": { + "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 + }, + "committer": { + "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 + }, + "parents": [ + { + "sha": "3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "url": "https://api.github.com/repos/github-api-test-org/github-api/commits/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353", + "html_url": "https://github.com/github-api-test-org/github-api/commit/3a09d2de4a9a1322a0ba2c3e2f54a919ca8fe353" + } + ] + }, + "_links": { + "self": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode", + "html": "https://github.com/github-api-test-org/github-api/tree/test/#UrlEncode" + }, + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "enforcement_level": "off", + "contexts": [] + } + }, + "protection_url": "https://api.github.com/repos/github-api-test-org/github-api/branches/test/#UrlEncode/protection" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json new file mode 100644 index 000000000..eab16ea06 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/__files/user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json @@ -0,0 +1,33 @@ +{ + "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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 166, + "public_gists": 4, + "followers": 135, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2019-09-24T19:32:29Z" +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/orgs_github-api-test-org-2-5e8ae8.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/orgs_github-api-test-org-2-5e8ae8.json new file mode 100644 index 000000000..6383a4eae --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/orgs_github-api-test-org-2-5e8ae8.json @@ -0,0 +1,48 @@ +{ + "id": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4992", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"b7989d48e6539c9c76038995b902421b\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DB:2A314B:5D8C0218" + } + }, + "uuid": "5e8ae8ed-0988-4df2-89d3-eda4c6bdc60d", + "persistent": true, + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api-3-30364e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api-3-30364e.json new file mode 100644 index 000000000..dda61603a --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api-3-30364e.json @@ -0,0 +1,48 @@ +{ + "id": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "name": "repos_github-api-test-org_github-api", + "request": { + "url": "/repos/github-api-test-org/github-api", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api-30364e1b-193c-4929-9dd0-5aab7b47dbb9.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4991", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"afa5bdcd11463905460dc32b4cbac3ba\"", + "Last-Modified": "Wed, 25 Sep 2019 23:37:07 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322DE:2A315A:5D8C0218" + } + }, + "uuid": "30364e1b-193c-4929-9dd0-5aab7b47dbb9", + "persistent": true, + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json new file mode 100644 index 000000000..5d24c0f05 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/repos_github-api-test-org_github-api_branches_test_timeout-4-ed8bf5.json @@ -0,0 +1,47 @@ +{ + "id": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "name": "repos_github-api-test-org_github-api_branches_test_timeout", + "request": { + "url": "/repos/github-api-test-org/github-api/branches/test/timeout", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_github-api-test-org_github-api_branches_test_timeout-ed8bf5ba-65e0-47d8-bb4d-614063828c87.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:05 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4990", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"70021000b4de67768f66b57bbeead27c\"", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322E4:2A3160:5D8C0219" + } + }, + "uuid": "ed8bf5ba-65e0-47d8-bb4d-614063828c87", + "persistent": true, + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/user-1-c92cdb.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/user-1-c92cdb.json new file mode 100644 index 000000000..70c3d2211 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketConnectionAndRetry_Success/mappings/user-1-c92cdb.json @@ -0,0 +1,48 @@ +{ + "id": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc.json", + "headers": { + "Date": "Thu, 26 Sep 2019 00:11:04 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4994", + "X-RateLimit-Reset": "1569460192", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"14ffd29009ddc2209c450bb29a5a8330\"", + "Last-Modified": "Tue, 24 Sep 2019 19:32:29 GMT", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "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'", + "X-GitHub-Request-Id": "FD24:3764:2322CA:2A3143:5D8C0218" + } + }, + "uuid": "c92cdb3f-7cae-43ba-bee2-e5aa6863dcbc", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-2ed84efb-4e11-46f6-a65e-89ce1ba53804.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-2ed84efb-4e11-46f6-a65e-89ce1ba53804.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-2ed84efb-4e11-46f6-a65e-89ce1ba53804.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-93c8489e-fa39-4c02-8f81-1a486775d811.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-93c8489e-fa39-4c02-8f81-1a486775d811.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-93c8489e-fa39-4c02-8f81-1a486775d811.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-da646cb2-da76-4b45-bb7d-b087ca6bf44f.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-da646cb2-da76-4b45-bb7d-b087ca6bf44f.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/orgs_github-api-test-org-da646cb2-da76-4b45-bb7d-b087ca6bf44f.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/user-85fe2c3a-23a2-40b4-9280-7b48f0c62363.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/user-85fe2c3a-23a2-40b4-9280-7b48f0c62363.json new file mode 100644 index 000000000..43ac5aef4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/__files/user-85fe2c3a-23a2-40b4-9280-7b48f0c62363.json @@ -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": "bitwiseman@gmail.com", + "hireable": null, + "bio": "https://twitter.com/bitwiseman", + "public_repos": 178, + "public_gists": 7, + "followers": 145, + "following": 9, + "created_at": "2012-07-11T20:38:33Z", + "updated_at": "2020-01-23T23:40:57Z", + "private_gists": 8, + "total_private_repos": 10, + "owned_private_repos": 0, + "disk_usage": 33697, + "collaborators": 0, + "two_factor_authentication": true, + "plan": { + "name": "free", + "space": 976562499, + "collaborators": 0, + "private_repos": 10000 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-2-93c848.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-2-93c848.json new file mode 100644 index 000000000..5c55b0ee9 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-2-93c848.json @@ -0,0 +1,51 @@ +{ + "id": "93c8489e-fa39-4c02-8f81-1a486775d811", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-93c8489e-fa39-4c02-8f81-1a486775d811.json", + "headers": { + "Date": "Fri, 24 Jan 2020 23:35:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4989", + "X-RateLimit-Reset": "1579909317", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "C629:4263:C49388:ED7AC7:5E2B7F39" + } + }, + "uuid": "93c8489e-fa39-4c02-8f81-1a486775d811", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org", + "requiredScenarioState": "Started", + "newScenarioState": "scenario-1-orgs-github-api-test-org-2", + "insertionIndex": 2 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-3-da646c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-3-da646c.json new file mode 100644 index 000000000..f791d6609 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-3-da646c.json @@ -0,0 +1,51 @@ +{ + "id": "da646cb2-da76-4b45-bb7d-b087ca6bf44f", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-da646cb2-da76-4b45-bb7d-b087ca6bf44f.json", + "headers": { + "Date": "Fri, 24 Jan 2020 23:35:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4988", + "X-RateLimit-Reset": "1579909317", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "C629:4263:C49394:ED7AD5:5E2B7F39" + } + }, + "uuid": "da646cb2-da76-4b45-bb7d-b087ca6bf44f", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org", + "requiredScenarioState": "scenario-1-orgs-github-api-test-org-2", + "newScenarioState": "scenario-1-orgs-github-api-test-org-3", + "insertionIndex": 3 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-4-2ed84e.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-4-2ed84e.json new file mode 100644 index 000000000..8391c06bb --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/orgs_github-api-test-org-4-2ed84e.json @@ -0,0 +1,50 @@ +{ + "id": "2ed84efb-4e11-46f6-a65e-89ce1ba53804", + "name": "orgs_github-api-test-org", + "request": { + "url": "/orgs/github-api-test-org", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "orgs_github-api-test-org-2ed84efb-4e11-46f6-a65e-89ce1ba53804.json", + "headers": { + "Date": "Fri, 24 Jan 2020 23:35:21 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4987", + "X-RateLimit-Reset": "1579909316", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"0dfdf14c762767b64d42a9944f82d6ea\"", + "Last-Modified": "Mon, 20 Apr 2015 00:42:30 GMT", + "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": "admin:org, read:org, repo, user, write:org", + "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'", + "X-GitHub-Request-Id": "C629:4263:C493A2:ED7AE2:5E2B7F39" + } + }, + "uuid": "2ed84efb-4e11-46f6-a65e-89ce1ba53804", + "persistent": true, + "scenarioName": "scenario-1-orgs-github-api-test-org", + "requiredScenarioState": "scenario-1-orgs-github-api-test-org-3", + "insertionIndex": 4 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/user-1-85fe2c.json b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/user-1-85fe2c.json new file mode 100644 index 000000000..409b3f9df --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterRetryTest/wiremock/testSocketException/mappings/user-1-85fe2c.json @@ -0,0 +1,48 @@ +{ + "id": "85fe2c3a-23a2-40b4-9280-7b48f0c62363", + "name": "user", + "request": { + "url": "/user", + "method": "GET", + "headers": { + "Accept": { + "equalTo": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "user-85fe2c3a-23a2-40b4-9280-7b48f0c62363.json", + "headers": { + "Date": "Fri, 24 Jan 2020 23:19:22 GMT", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4996", + "X-RateLimit-Reset": "1579909317", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"f4a9f18eb2c9699f7dcac048f56ae5d0\"", + "Last-Modified": "Thu, 23 Jan 2020 23:40:57 GMT", + "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'", + "X-GitHub-Request-Id": "C568:89EE:16E101:1BA2ED:5E2B7B7A" + } + }, + "uuid": "85fe2c3a-23a2-40b4-9280-7b48f0c62363", + "persistent": true, + "insertionIndex": 1 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/RequesterTest/wiremock/test404RetryDoesNotThrow/__files/orgs_github-api-test-org-1d421645-a22c-481c-9765-ac6ce8c444d9.json b/src/test/resources/org/kohsuke/github/RequesterTest/wiremock/test404RetryDoesNotThrow/__files/orgs_github-api-test-org-1d421645-a22c-481c-9765-ac6ce8c444d9.json new file mode 100644 index 000000000..a85b2037e --- /dev/null +++ b/src/test/resources/org/kohsuke/github/RequesterTest/wiremock/test404RetryDoesNotThrow/__files/orgs_github-api-test-org-1d421645-a22c-481c-9765-ac6ce8c444d9.json @@ -0,0 +1,41 @@ +{ + "login": "github-api-test-org", + "id": 7544739, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=", + "url": "https://api.github.com/orgs/github-api-test-org", + "repos_url": "https://api.github.com/orgs/github-api-test-org/repos", + "events_url": "https://api.github.com/orgs/github-api-test-org/events", + "hooks_url": "https://api.github.com/orgs/github-api-test-org/hooks", + "issues_url": "https://api.github.com/orgs/github-api-test-org/issues", + "members_url": "https://api.github.com/orgs/github-api-test-org/members{/member}", + "public_members_url": "https://api.github.com/orgs/github-api-test-org/public_members{/member}", + "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4", + "description": null, + "is_verified": false, + "has_organization_projects": true, + "has_repository_projects": true, + "public_repos": 10, + "public_gists": 0, + "followers": 0, + "following": 0, + "html_url": "https://github.com/github-api-test-org", + "created_at": "2014-05-10T19:39:11Z", + "updated_at": "2015-04-20T00:42:30Z", + "type": "Organization", + "total_private_repos": 0, + "owned_private_repos": 0, + "private_gists": 0, + "disk_usage": 147, + "collaborators": 0, + "billing_email": "kk@kohsuke.org", + "default_repository_permission": "none", + "members_can_create_repositories": false, + "two_factor_requirement_enabled": false, + "plan": { + "name": "free", + "space": 976562499, + "private_repos": 0, + "filled_seats": 11, + "seats": 0 + } +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/orgs_github-api-test-org-18671a38-8d77-4242-9519-3503350cf496.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/orgs_github-api-test-org-18671a38-8d77-4242-9519-3503350cf496.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/orgs_github-api-test-org-18671a38-8d77-4242-9519-3503350cf496.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/orgs_github-api-test-org-18671a38-8d77-4242-9519-3503350cf496.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api-dac6a9c8-632c-4fe0-8f83-a79f1c361f46.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api-dac6a9c8-632c-4fe0-8f83-a79f1c361f46.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api-dac6a9c8-632c-4fe0-8f83-a79f1c361f46.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api-dac6a9c8-632c-4fe0-8f83-a79f1c361f46.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs-ae6bc9aa-4a6b-4022-87ea-c545ee0c7c0a.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs-ae6bc9aa-4a6b-4022-87ea-c545ee0c7c0a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs-ae6bc9aa-4a6b-4022-87ea-c545ee0c7c0a.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs-ae6bc9aa-4a6b-4022-87ea-c545ee0c7c0a.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs-d5310eac-a58b-496e-9829-5bfb59231e49.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs-d5310eac.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs-d5310eac-a58b-496e-9829-5bfb59231e49.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs-d5310eac.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d-6074-412b-bb7a-f3de1bd9ca9c.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d-6074-412b-bb7a-f3de1bd9ca9c.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf-7c2e-48fa-92a7-f493ffbe7262.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf-7c2e-48fa-92a7-f493ffbe7262.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a-351b-499c-866b-11122bd52803.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a-351b-499c-866b-11122bd52803.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/user-0e4fff19-acf2-4b5d-863e-ac84adf7a090.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/user-0e4fff19-acf2-4b5d-863e-ac84adf7a090.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/user-0e4fff19-acf2-4b5d-863e-ac84adf7a090.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/user-0e4fff19-acf2-4b5d-863e-ac84adf7a090.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/user-ba9eb87b-ec27-4a38-9faf-f238b715e9ac.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/user-ba9eb87b-ec27-4a38-9faf-f238b715e9ac.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/__files/user-ba9eb87b-ec27-4a38-9faf-f238b715e9ac.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/__files/user-ba9eb87b-ec27-4a38-9faf-f238b715e9ac.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/orgs_github-api-test-org-3-18671a.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/orgs_github-api-test-org-3-18671a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/orgs_github-api-test-org-3-18671a.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/orgs_github-api-test-org-3-18671a.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api-4-dac6a9.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api-4-dac6a9.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api-4-dac6a9.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api-4-dac6a9.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs-12-ae6bc9.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs-12-ae6bc9.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs-12-ae6bc9.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs-12-ae6bc9.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json similarity index 98% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json index d994a52ae..b9e10be7a 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs-6-d5310e.json @@ -19,7 +19,7 @@ }, "response": { "status": 201, - "bodyFileName": "repos_github-api-test-org_github-api_git_refs-d5310eac-a58b-496e-9829-5bfb59231e49.json", + "bodyFileName": "repos_github-api-test-org_github-api_git_refs-d5310eac.json", "headers": { "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-10-05226c.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-10-05226c.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-10-05226c.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-10-05226c.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-11-6e1f95.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-11-6e1f95.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-11-6e1f95.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-11-6e1f95.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-13-60a342.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-13-60a342.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-13-60a342.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-13-60a342.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json similarity index 97% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json index 844efde44..f32dd8052 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-14-709410.json @@ -18,7 +18,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf-7c2e-48fa-92a7-f493ffbe7262.json", + "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-709410bf.json", "headers": { "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-15-eea55a.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-15-eea55a.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-15-eea55a.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-15-eea55a.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json similarity index 97% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json index da689134e..1c30ba73e 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-7-396478.json @@ -18,7 +18,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d-6074-412b-bb7a-f3de1bd9ca9c.json", + "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-3964781d.json", "headers": { "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-8-4506da.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-8-4506da.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-8-4506da.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-8-4506da.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-9-fc958c.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-9-fc958c.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-9-fc958c.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_content_ref_cache-9-fc958c.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json similarity index 96% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json index 4fab8e2d3..84c188bbb 100644 --- a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json +++ b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-5-d47b33.json @@ -12,7 +12,7 @@ }, "response": { "status": 200, - "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a-351b-499c-866b-11122bd52803.json", + "bodyFileName": "repos_github-api-test-org_github-api_git_refs_heads_test_unmergeable-d47b333a.json", "headers": { "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", "Content-Type": "application/json; charset=utf-8", diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/user-1-0e4fff.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/user-1-0e4fff.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/user-1-0e4fff.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/user-1-0e4fff.json diff --git a/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/user-2-ba9eb8.json b/src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/user-2-ba9eb8.json similarity index 100% rename from src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero_GitHubRef_Error/mappings/user-2-ba9eb8.json rename to src/test/resources/org/kohsuke/github/extras/GitHubCachingTest/wiremock/testCached404/mappings/user-2-ba9eb8.json