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 a8006d6 commit 78cfa5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/http-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
# run: |

# sed -i -e 's+(project in file("./zio-http"))+(project in file("./zio-http"))' build.sbt
- name: Compile
run: sbt clean compile

- name: Run HTTP Conformance Tests
run: sbt "project zioHttpJVM" "testOnly zio.http.ConformanceSpec"
11 changes: 4 additions & 7 deletions zio-http/jvm/src/test/scala/zio/http/ServerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -522,17 +522,14 @@ object ServerSpec extends RoutesRunnableSpec {
val route = Method.GET / "test" -> Handler.ok
val app = Routes(route)

val requestWithoutHost = Request.get("/test")

val res = app.deploy.runZIO(requestWithoutHost).map(_.status)
val res = app.deploy.status.run(path = Path.root / "test")
assertZIO(res)(equalTo(Status.BadRequest))
} +
test("should return 200 OK if Host header is present") {
val route = Method.GET / "test" -> Handler.ok
val app = Routes(route)
val requestWithHost = Request.get("/test").addHeader(Header.Host("localhost"))
val route = Method.GET / "test" -> Handler.ok
val app = Routes(route)

val res = app.deploy.runZIO(requestWithHost).map(_.status)
val res = app.deploy.status.run(path = Path.root / "test", headers = Headers(Header.Host("localhost")))
assertZIO(res)(equalTo(Status.Ok))
}
}
Expand Down

0 comments on commit 78cfa5d

Please sign in to comment.