[sensibo] Add test for Accept-Encoding header (#17072)

* Add accept-encoding header to reduce chance of rate limiting

Signed-off-by: Arne Seime <arne.seime@gmail.com>
This commit is contained in:
Arne Seime 2024-07-25 09:48:45 +02:00 committed by GitHub
parent 1fedd7ad42
commit 2179cd9646
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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);