Skip to content

Commit

Permalink
Fix test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed Sep 22, 2022
1 parent 1ac81c6 commit 2b955cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/tests/shared/src/test/scala/BitVectorSocketTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ class BitVectorSocketTest extends ffstest.FTest {
override def serverResource(address: Option[Host], port: Option[Port], options: List[SocketOption]): Resource[IO, (SocketAddress[IpAddress], fs2.Stream[IO, Socket[IO]])] = ???
}

private val socketOptions = List(SocketOption.noDelay(true))

test("Invalid host") {
BitVectorSocket("", 1, dummySg, None).use(_ => IO.unit).assertFailsWith[SkunkException]
BitVectorSocket("", 1, dummySg, socketOptions, None).use(_ => IO.unit).assertFailsWith[SkunkException]
.flatMap(e => assertEqual("message", e.message, """Hostname: "" is not syntactically valid."""))
}
test("Invalid port") {
BitVectorSocket("localhost", -1, dummySg, None).use(_ => IO.unit).assertFailsWith[SkunkException]
BitVectorSocket("localhost", -1, dummySg, socketOptions, None).use(_ => IO.unit).assertFailsWith[SkunkException]
.flatMap(e => assertEqual("message", e.message, "Port: -1 falls out of the allowed range."))
}

Expand Down

0 comments on commit 2b955cf

Please sign in to comment.