Repository: hub4j/github-api
Pull request #1563 (2022-11-12 01:21:32)

Chore(deps-dev): Bump wiremock-jre8-standalone from 2.32.0 to 2.35.0
Bumps [wiremock-jre8-standalone](https://github.com/wiremock/wiremock) from 2.32.0 to 2.35.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/wiremock/wiremock/releases">wiremock-jre8-standalone's releases</a>.</em></p>
<blockquote>
<h2>2.35.0</h2>
<h2>Enhancements</h2>
<ul>
<li>Add a negative contains matcher - thanks Damian Orzepowski</li>
<li>Expose a Java API method for removing stubs by ID - thanks Patryk Fraczek</li>
<li>Document the import API in the OpenAPI doc - thanks to user i-whammy</li>
<li>Added the ability to restrict the addresses WireMock can proxy/record to, as a security measure.</li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Strip Maven directories from the standalone JAR as some were appearing that weren't related to dependencies actually present, confusing scanning tools - thanks to user krageon</li>
<li>Dropped back to slf4j 1.7.36 and relocate it in the standalone JAR (ensuring 2.x users won't experience conflicts).</li>
</ul>
<h2>2.34.0</h2>
<p>This will be the final 2.x.x release and also the last to support Java 8.</p>
<h2>Fixes</h2>
<ul>
<li>Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1689">#1689</a> - incorrect HTTP version header - thanks to user Poojitha</li>
<li>Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1882">#1882</a> - bug preventing matching of date/time query params/headers with custom format - thanks Klaas Dellschaft</li>
<li><a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1930">#1930</a> - Fixed a partial path traversal vulnerability in the file source code - thanks Jonathan Leitschuh</li>
<li>Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1783">#1783</a> - proxyUrlPrefixToRemove ignored when using a response definition transformer - thanks to user Ross-H-Projects</li>
<li>Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1872">#1872</a> - create a request entity for POST, PUT etc. proxied requests when a content-length header is present, regardless of whether the size is 0.</li>
<li>Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1946">#1946</a> - maths helper now supports epoch dates as inputs.</li>
</ul>
<h2>Enhancements</h2>
<ul>
<li>Added a public, non-static getScenarios() method allowing access to all scenarios.</li>
</ul>
<p>All dependencies brought up to date including Jetty to 9.4.48.v20220622.</p>
<h2>2.33.2</h2>
<p>WireMock 2.33.1 was accidentally released using Java 11 rather than 8, resulting in class incompatibilities in places.</p>
<p>This release is functionally identical but built using Java 8.</p>
<h2>2.33.1</h2>
<h3>Fixes</h3>
<ul>
<li>Put name field back on scenario API object having accidentally removed it.</li>
<li>Improved validation of scenario set and reset so that reasonable errors are returned when attempting to use non-existent scenario names or states.</li>
</ul>
<h2>2.33.0</h2>
<p>This is primarily a maintenance release that brings all dependency versions up to date including a version of Jackson containing the fix for CVE-2020-36518.</p>
<h3>Enhancements</h3>
<ul>
<li>Added the ability to set and reset a single scenario's state</li>
<li>Proxy will now send a request body for any request method.</li>
<li>CORS response headers are now passed back from proxy responses when stub CORS is disabled.</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Improved performance of Request.getHeaders() - thanks Doug Roper.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/wiremock/wiremock/commit/a137ab15acd7da4330418063be5514fbb15bf7c3"><code>a137ab1</code></a> Fixed <a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1684">#1684</a> - Expose remove stub mapping by ID (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1986">#1986</a>)</li>
<li><a href="https://github.com/wiremock/wiremock/commit/6cfd74d681705407be850762090ae9a195462837"><code>6cfd74d</code></a> Bump mockito-core from 4.8.0 to 4.8.1 (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1998">#1998</a>)</li>
<li><a href="https://github.com/wiremock/wiremock/commit/328f6e5ae22a5a1d80f68eca48e0225265c35e12"><code>328f6e5</code></a> Bumped minor version</li>
<li><a href="https://github.com/wiremock/wiremock/commit/e1368f436fc692b14b5edf36a0fcf65a12dff131"><code>e1368f4</code></a> Added slf4j no-op (disables logging and annoying messages from slf4j) to the ...</li>
<li><a href="https://github.com/wiremock/wiremock/commit/1f43b2794ca301a8504851b90d23522193bec5b1"><code>1f43b27</code></a> Dropped back down to slf4j 1.7.36 and relocated it in the standalone JAR to a...</li>
<li><a href="https://github.com/wiremock/wiremock/commit/b367b7b1be2aca2c61836ce3c42d699439597223"><code>b367b7b</code></a> Switched BodyChunker to use the configured notifier rather than creating its own</li>
<li><a href="https://github.com/wiremock/wiremock/commit/dac7adb492f62296020861d623fb51f0c53298b9"><code>dac7adb</code></a> Bumping Handlebars library version to 4.3.1, that includes the fixed (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1995">#1995</a>)</li>
<li><a href="https://github.com/wiremock/wiremock/commit/bfc5f1d13380b1254e1f87b3bdded0715078532f"><code>bfc5f1d</code></a> removes maven dir in output shadow jar (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1993">#1993</a>)</li>
<li><a href="https://github.com/wiremock/wiremock/commit/07463838a6eb41a2524c58b835b2aec7428285ed"><code>0746383</code></a> Bump versions.jsonUnit from 2.35.0 to 2.36.0 (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1976">#1976</a>)</li>
<li><a href="https://github.com/wiremock/wiremock/commit/d77938bc20a0fa2f1ef401f6bd532c06f43ca405"><code>d77938b</code></a> Bump asm from 9.3 to 9.4 (<a href="https://github-redirect.dependabot.com/wiremock/wiremock/issues/1974">#1974</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/wiremock/wiremock/compare/2.32.0...2.35.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.tomakehurst:wiremock-jre8-standalone&package-manager=maven&previous-version=2.32.0&new-version=2.35.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/pom.xml b/pom.xml
index b03f57c49..a14724aa1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -579,7 +579,7 @@
     <dependency>
       <groupId>com.github.tomakehurst</groupId>
       <artifactId>wiremock-jre8-standalone</artifactId>
-      <version>2.32.0</version>
+      <version>2.35.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>


Test patch:
diff --git a/src/test/java/org/kohsuke/github/junit/WireMockRule.java b/src/test/java/org/kohsuke/github/junit/WireMockRule.java
index f65e4cf11..b7e89a6cd 100644
--- a/src/test/java/org/kohsuke/github/junit/WireMockRule.java
+++ b/src/test/java/org/kohsuke/github/junit/WireMockRule.java
@@ -527,6 +527,16 @@ public class WireMockRule implements MethodRule, TestRule, Container, Stubbing,
         wireMockServer.editStubMapping(stubMapping);
     }
 
+    /**
+     * Removes the stub mapping.
+     *
+     * @param id
+     *            the id
+     */
+    public void removeStubMapping(UUID id) {
+        wireMockServer.removeStubMapping(id);
+    }
+
     /**
      * List all stub mappings.
      *
@@ -711,6 +721,28 @@ public class WireMockRule implements MethodRule, TestRule, Container, Stubbing,
         return wireMockServer.getAllScenarios();
     }
 
+    /**
+     * Reset a scenario
+     *
+     * @param name
+     *            the name
+     */
+    public void resetScenario(String name) {
+        wireMockServer.resetScenario(name);
+    }
+
+    /**
+     * Set scenario state
+     *
+     * @param name
+     *            the name
+     * @param state
+     *            the state
+     */
+    public void setScenarioState(String name, String state) {
+        wireMockServer.setScenarioState(name, state);
+    }
+
     /**
      * Find top near misses for.
      *
diff --git a/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java b/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java
index ee8f95313..1960061c0 100644
--- a/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java
+++ b/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java
@@ -411,4 +411,21 @@ public class WireMockRuleConfiguration implements Options {
         return parent.getDisableStrictHttpHeaders();
     }
 
+    /**
+     * Gets the data truncation settings.
+     *
+     * @return the data truncation settings
+     */
+    public DataTruncationSettings getDataTruncationSettings() {
+        return parent.getDataTruncationSettings();
+    }
+
+    /**
+     * Gets the network address rules.
+     *
+     * @return the network address rules
+     */
+    public NetworkAddressRules getProxyTargetRules() {
+        return parent.getProxyTargetRules();
+    }
 }