Skip to content

Instantly share code, notes, and snippets.

@FRosner
Created June 7, 2019 09:44
Show Gist options
  • Save FRosner/d293c6efaf4e8ad1d2529fe92645da6c to your computer and use it in GitHub Desktop.
Save FRosner/d293c6efaf4e8ad1d2529fe92645da6c to your computer and use it in GitHub Desktop.
fun testAfterMigration(postgresContainer: PostgresContainer, testFunction: suspend (PgClient) -> Unit) {
migrate(postgresContainer.connectionDetails)
val pgClient = createPgClient(postgresContainer.connectionDetails)
runBlocking {
testFunction(pgClient)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment