CreateServerTest

sttp.tapir.server.tests.CreateServerTest
trait CreateServerTest[F[_], +R, OPTIONS, ROUTE]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DefaultCreateServerTest[F, R, OPTIONS, ROUTE]

Members list

Type members

Types

protected type Interceptors = CustomiseInterceptors[F, OPTIONS] => CustomiseInterceptors[F, OPTIONS]

Value members

Abstract methods

def testServer[I, E, O](e: PublicEndpoint[I, E, O, R], testNameSuffix: String, interceptors: Interceptors)(fn: I => F[Either[E, O]])(runTest: (SttpBackend[IO, Fs2Streams[IO] & WebSockets], Uri) => IO[Assertion]): Test
def testServer(name: String, rs: => NonEmptyList[ROUTE])(runTest: (SttpBackend[IO, Fs2Streams[IO] & WebSockets], Uri) => IO[Assertion]): Test
def testServerLogic(e: ServerEndpoint[R, F], testNameSuffix: String, interceptors: Interceptors)(runTest: (SttpBackend[IO, Fs2Streams[IO] & WebSockets], Uri) => IO[Assertion]): Test
def testServerLogicWithStop(e: ServerEndpoint[R, F], testNameSuffix: String, interceptors: Interceptors, gracefulShutdownTimeout: Option[FiniteDuration])(runTest: KillSwitch => (SttpBackend[IO, Fs2Streams[IO] & WebSockets], Uri) => IO[Assertion]): Test

Concrete methods

def testServerWithStop(name: String, rs: => NonEmptyList[ROUTE], gracefulShutdownTimeout: Option[FiniteDuration])(runTest: KillSwitch => (SttpBackend[IO, Fs2Streams[IO] & WebSockets], Uri) => IO[Assertion]): Test

Override for a server to allow running tests which have access to a stop() effect, allowing shutting down the server within the test. By default, this method just uses a no-op IO.unit.

Override for a server to allow running tests which have access to a stop() effect, allowing shutting down the server within the test. By default, this method just uses a no-op IO.unit.

Attributes