KtorTestApplication
abstract class KtorTestApplication(scope: InjectionScope, val appName: String?) : TegralService, ClientProvider
A component that manages KtorApplication components and provides test facilities over them.
Note: in a test environment, you must add with noService
to your KtorApplication declaration, like so:
put(::MyKtorApplication) with noService
Content copied to clipboard
This is because integration testing environments perform start
sequences like regular environments, yet we do not generally want to actually start a Ktor server.
Constructors
Functions
Link copied to clipboard
A function called for every created client for the application.
Link copied to clipboard
open override fun createClient(block: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): HttpClient