]> git.basschouten.com Git - openhab-addons.git/commitdiff
[sensibo] Add test for Accept-Encoding header (#17072)
authorArne Seime <seime@users.noreply.github.com>
Thu, 25 Jul 2024 07:48:45 +0000 (09:48 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2024 07:48:45 +0000 (09:48 +0200)
* Add accept-encoding header to reduce chance of rate limiting

Signed-off-by: Arne Seime <arne.seime@gmail.com>
bundles/org.openhab.binding.sensibo/src/test/java/org/openhab/binding/sensibo/internal/handler/SensiboAccountHandlerTest.java

index 169d4c6131b44305342214a8b3cd8fa522586597..7ba0cc74861a9ac5859c400c17e204b27b0db5da 100644 (file)
@@ -90,6 +90,7 @@ public class SensiboAccountHandlerTest {
         final String getPodsResponse = new String(getClass().getResourceAsStream(podsResponse).readAllBytes(),
                 StandardCharsets.UTF_8);
         stubFor(get(urlEqualTo("/api/v2/users/me/pods?fields=*&apiKey=APIKEY"))
+                .withHeader("Accept-Encoding", equalTo("gzip"))
                 .willReturn(aResponse().withStatus(200).withBody(getPodsResponse)));
 
         when(sensiboAccountMock.getConfiguration()).thenReturn(configuration);