Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Sep 29, 2024
1 parent 5f420eb commit d5b8933
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions zio-http/jvm/src/test/scala/zio/http/ServerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,11 @@ object ServerSpec extends RoutesRunnableSpec {
val route = Method.GET / "test" -> Handler.ok
val app = Routes(route)

// Start the app using RoutesRunnableSpec, which triggers the entire server lifecycle
val requestWithoutHost = Request.get("/test")

for {
port <- serve(app)
response <- Client.request(Request.get(s"http://localhost:$port/test"))
} yield assertTrue(response.status == Status.BadRequest)
response <- app.deploy.status.run(requestWithoutHost)
} yield assertZIO(response)(equalTo(Status.BadRequest))
} +
test("should return 200 OK if Host header is present") {
val route = Method.GET / "test" -> Handler.ok
Expand Down Expand Up @@ -863,7 +863,6 @@ object ServerSpec extends RoutesRunnableSpec {
DynamicServer.live,
ZLayer.succeed(configApp),
Server.customized,
ZLayer.succeed(NettyConfig.defaultWithFastShutdown),
Client.default,
) @@ sequential @@ withLiveClock

Expand Down

0 comments on commit d5b8933

Please sign in to comment.