Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Dec 30, 2024
1 parent 133763c commit 1f793a9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,17 @@ trait HttpTestExtensions[F[_]] extends AsyncFreeSpecLike { self: HttpTest[F] =>
val testFileContent = "test file content" * 100
withTemporaryFile(Some(testFileContent.getBytes())) { file =>
val req = basicRequest
.compressBody(Encodings.Gzip)
// .compressBody(Encodings.Gzip)
.response(asByteArrayAlways)
.post(uri"$endpoint/echo/exact")
.body(file)
req.send(backend).toFuture().map { resp =>
resp.code shouldBe StatusCode.Ok

val gzipInputStream = new GZIPInputStream(new ByteArrayInputStream(resp.body))
val decompressedBytes = gzipInputStream.readAllBytes()
// val gzipInputStream = new GZIPInputStream(new ByteArrayInputStream(resp.body))
// val decompressedBytes = gzipInputStream.readAllBytes()

new String(decompressedBytes) shouldBe testFileContent
new String(resp.body) shouldBe testFileContent
}
}
}
Expand Down

0 comments on commit 1f793a9

Please sign in to comment.