From 542393929ed64f7253455a7a00706137cada8b38 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 2 Nov 2021 08:58:39 -0700 Subject: [PATCH 1/5] Update okhttp to 4.9.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e8b37137b..5ddc05aa47 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 4.4.2 true 2.2 - 4.4.1 + 4.9.1 2.10.0 0.70 From 9e52a57fadb95715ab0e279b3b4026b47395537d Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 2 Nov 2021 09:10:42 -0700 Subject: [PATCH 2/5] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ddc05aa47..43c52bcaa4 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 4.4.2 true 2.2 - 4.9.1 + 4.9.2 2.10.0 0.70 From 40dd984e1e5dc459dac459d0b00d078bc1016d15 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 2 Nov 2021 12:44:29 -0700 Subject: [PATCH 3/5] Close and delete cache when test finishes --- .../extras/okhttp3/OkHttpConnectorTest.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 1f6b3cafa0..792c199442 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java @@ -5,6 +5,7 @@ import okhttp3.Cache; import okhttp3.OkHttpClient; import org.apache.commons.io.FileUtils; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.kohsuke.github.AbstractGitHubWireMockTest; @@ -67,6 +68,7 @@ public OkHttpConnectorTest() { private static int maxAgeNoneHitCount = 11; private GHRateLimit rateLimitBefore; + private Cache cache = null; @Override protected WireMockConfiguration getWireMockOptions() { @@ -88,6 +90,13 @@ public void setupRepo() throws Exception { } } + @After + public void deleteCache() throws IOException { + if (cache != null) { + cache.delete(); + } + } + @Test public void DefaultConnector() throws Exception { @@ -120,7 +129,6 @@ public void OkHttpConnector_NoCache() throws Exception { checkRequestAndLimit(okhttpNetworkRequestCount, okhttpRateLimitUsed); - Cache cache = client.cache(); assertThat("Cache", cache, is(nullValue())); } @@ -147,8 +155,6 @@ public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { checkRequestAndLimit(maxAgeNoneNetworkRequestCount, maxAgeNoneRateLimitUsed); - Cache cache = client.cache(); - // NOTE: this is actually bad. // This elevated hit count is the stale requests returning bad data took longer to detect a change. assertThat("getHitCount", cache.hitCount(), is(maxAgeNoneHitCount)); @@ -176,7 +182,6 @@ public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { checkRequestAndLimit(maxAgeThreeNetworkRequestCount, maxAgeThreeRateLimitUsed); - Cache cache = client.cache(); assertThat("getHitCount", cache.hitCount(), is(maxAgeThreeHitCount)); } @@ -202,7 +207,6 @@ public void OkHttpConnector_Cache_MaxAgeDefault_Zero() throws Exception { checkRequestAndLimit(maxAgeZeroNetworkRequestCount, maxAgeZeroRateLimitUsed); - Cache cache = client.cache(); assertThat("getHitCount", cache.hitCount(), is(maxAgeZeroHitCount)); } @@ -228,7 +232,7 @@ private OkHttpClient createClient(boolean useCache) throws IOException { File cacheDir = new File("target/cache/" + baseFilesClassPath + "/" + mockGitHub.getMethodName()); cacheDir.mkdirs(); FileUtils.cleanDirectory(cacheDir); - Cache cache = new Cache(cacheDir, 100 * 1024L * 1024L); + cache = new Cache(cacheDir, 100 * 1024L * 1024L); builder.cache(cache); } From 3768528a87ad084ff136454136c466e5c3c8e1c3 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 2 Nov 2021 13:07:08 -0700 Subject: [PATCH 4/5] Fix typo --- ...pos_hub4j-test-org_github-api-10-10-2.json | 51 +++++++++++++++++++ ...repos_hub4j-test-org_github-api-10-10.json | 7 ++- .../repos_hub4j-test-org_github-api-8-8.json | 7 ++- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json new file mode 100644 index 0000000000..e42a9478b4 --- /dev/null +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json @@ -0,0 +1,51 @@ +{ + "id": "5432b23c-70f2-4ecf-a380-a232afeef015", + "name": "repos_hub4j-test-org_github-api", + "request": { + "url": "/repos/hub4j-test-org/github-api", + "method": "GET", + "headers": { + "If-None-Match": { + "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" + } + } + }, + "response": { + "status": 200, + "bodyFileName": "repos_hub4j-test-org_github-api-10.json", + "headers": { + "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", + "Content-Type": "application/json; charset=utf-8", + "Server": "GitHub.com", + "Status": "200 OK", + "X-RateLimit-Limit": "5000", + "X-RateLimit-Remaining": "4966", + "X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}", + "Cache-Control": "private, max-age=60, s-maxage=60", + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding" + ], + "ETag": "W/\"4f508593b64df214fee8f6ab42df633c\"", + "Last-Modified": "{{now offset='-1 seconds' timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", + "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", + "X-Accepted-OAuth-Scopes": "repo", + "X-GitHub-Media-Type": "github.v3; format=json", + "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": "FBD4:8499:15E11B0:19F4373:5D9258AD" + } + }, + "uuid": "5432b23c-70f2-4ecf-a380-a232afeef015", + "persistent": true, + "scenarioName": "scenario-1-repos-hub4j-test-org-github-api", + "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-2", + "newScenarioState": "scenario-3-repos-hub4j-test-org-github-api-0", + "insertionIndex": 10 +} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10.json index a61809f336..e38467763f 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10.json @@ -3,7 +3,12 @@ "name": "repos_hub4j-test-org_github-api", "request": { "url": "/repos/hub4j-test-org/github-api", - "method": "GET" + "method": "GET", + "headers": { + "If-None-Match": { + "absent" : true + } + } }, "response": { "status": 200, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json index 43f3961339..0640324eb5 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json @@ -3,7 +3,12 @@ "name": "repos_hub4j-test-org_github-api", "request": { "url": "/repos/hub4j-test-org/github-api", - "method": "GET" + "method": "GET", + "headers": { + "If-None-Match": { + "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" + } + } }, "response": { "status": 304, From 094053099c11e4750c39f21cab48f368cb360c6e Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 2 Nov 2021 14:25:20 -0700 Subject: [PATCH 5/5] Fix mappings to allow for variability between windows and other OSes --- ...pos_hub4j-test-org_github-api-10-10-2.json | 51 ------------------- ...repos_hub4j-test-org_github-api-12-12.json | 2 +- ...repos_hub4j-test-org_github-api-13-13.json | 2 +- ...repos_hub4j-test-org_github-api-14-14.json | 2 +- ...repos_hub4j-test-org_github-api-16-16.json | 2 +- ...repos_hub4j-test-org_github-api-17-17.json | 2 +- .../repos_hub4j-test-org_github-api-4-4.json | 7 ++- .../repos_hub4j-test-org_github-api-6-6.json | 2 +- .../repos_hub4j-test-org_github-api-7-7.json | 2 +- .../repos_hub4j-test-org_github-api-8-8.json | 2 +- 10 files changed, 14 insertions(+), 60 deletions(-) delete mode 100644 src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json deleted file mode 100644 index e42a9478b4..0000000000 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-10-10-2.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "id": "5432b23c-70f2-4ecf-a380-a232afeef015", - "name": "repos_hub4j-test-org_github-api", - "request": { - "url": "/repos/hub4j-test-org/github-api", - "method": "GET", - "headers": { - "If-None-Match": { - "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" - } - } - }, - "response": { - "status": 200, - "bodyFileName": "repos_hub4j-test-org_github-api-10.json", - "headers": { - "Date": "{{now timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", - "Content-Type": "application/json; charset=utf-8", - "Server": "GitHub.com", - "Status": "200 OK", - "X-RateLimit-Limit": "5000", - "X-RateLimit-Remaining": "4966", - "X-RateLimit-Reset": "{{now offset='1 hours' format='unix'}}", - "Cache-Control": "private, max-age=60, s-maxage=60", - "Vary": [ - "Accept, Authorization, Cookie, X-GitHub-OTP", - "Accept-Encoding" - ], - "ETag": "W/\"4f508593b64df214fee8f6ab42df633c\"", - "Last-Modified": "{{now offset='-1 seconds' timezone='GMT' format='EEE, dd MMM yyyy HH:mm:ss z'}}", - "X-OAuth-Scopes": "gist, notifications, read:org, read:public_key, read:repo_hook, repo", - "X-Accepted-OAuth-Scopes": "repo", - "X-GitHub-Media-Type": "github.v3; format=json", - "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": "FBD4:8499:15E11B0:19F4373:5D9258AD" - } - }, - "uuid": "5432b23c-70f2-4ecf-a380-a232afeef015", - "persistent": true, - "scenarioName": "scenario-1-repos-hub4j-test-org-github-api", - "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-2", - "newScenarioState": "scenario-3-repos-hub4j-test-org-github-api-0", - "insertionIndex": 10 -} \ No newline at end of file diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-12-12.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-12-12.json index 33bf1c3d32..b466422d45 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-12-12.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-12-12.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"4f508593b64df214fee8f6ab42df633c\"" + "matches": "^(W/)?\"4f508593b64df214fee8f6ab42df633c\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-13-13.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-13-13.json index efff9ad81b..4ea4048f87 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-13-13.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-13-13.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"4f508593b64df214fee8f6ab42df633c\"" + "matches": "^(W/)?\"4f508593b64df214fee8f6ab42df633c\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-14-14.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-14-14.json index 9c7407a63b..ed25882b7b 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-14-14.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-14-14.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"4f508593b64df214fee8f6ab42df633c\"" + "matches": "^(W/)?\"4f508593b64df214fee8f6ab42df633c\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-16-16.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-16-16.json index 441daa1510..3767966f85 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-16-16.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-16-16.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"31f73a7ecc35bbecec125851ce166af4\"" + "matches": "^(W/)?\"31f73a7ecc35bbecec125851ce166af4\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-17-17.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-17-17.json index 5b8ee26f74..db7f0266e3 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-17-17.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-17-17.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"31f73a7ecc35bbecec125851ce166af4\"" + "matches": "^(W/)?\"31f73a7ecc35bbecec125851ce166af4\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-4-4.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-4-4.json index b0144c28df..fcd44fc134 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-4-4.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-4-4.json @@ -3,7 +3,12 @@ "name": "repos_hub4j-test-org_github-api", "request": { "url": "/repos/hub4j-test-org/github-api", - "method": "GET" + "method": "GET", + "headers": { + "If-None-Match": { + "absent" : true + } + } }, "response": { "status": 200, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-6-6.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-6-6.json index 842d10e1f8..dd40a89925 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-6-6.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-6-6.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" + "matches": "^(W/)?\"295ae3430c604f3d10b6eb145fe511b5\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-7-7.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-7-7.json index dae5742357..810a366205 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-7-7.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-7-7.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" + "matches": "^(W/)?\"295ae3430c604f3d10b6eb145fe511b5\"$" } } }, diff --git a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json index 0640324eb5..3998eb70ad 100644 --- a/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json +++ b/src/test/resources/org/kohsuke/github/extras/OkHttpConnectorTest/wiremock/OkHttpConnector_Cache_MaxAgeDefault_Zero/mappings/repos_hub4j-test-org_github-api-8-8.json @@ -6,7 +6,7 @@ "method": "GET", "headers": { "If-None-Match": { - "equalTo": "\"295ae3430c604f3d10b6eb145fe511b5\"" + "matches": "^(W/)?\"295ae3430c604f3d10b6eb145fe511b5\"$" } } },