32 lines
938 B
Kotlin
32 lines
938 B
Kotlin
package be.simplenotes.persistence.users
|
|
|
|
import be.simplenotes.config.DataSourceConfig
|
|
import be.simplenotes.persistence.KMariadbContainer
|
|
import be.simplenotes.persistence.h2dataSourceConfig
|
|
import be.simplenotes.persistence.mariadbDataSourceConfig
|
|
import org.junit.jupiter.api.AfterAll
|
|
import org.junit.jupiter.api.Tag
|
|
import org.junit.jupiter.api.parallel.ResourceLock
|
|
|
|
@ResourceLock("h2")
|
|
internal class UserRepositoryImplTest : BaseUserRepositoryImplTest() {
|
|
override fun dataSourceConfig() = h2dataSourceConfig()
|
|
}
|
|
|
|
@Tag("slow")
|
|
@ResourceLock("mariadb")
|
|
internal class MariaDbUserRepositoryImplTest : BaseUserRepositoryImplTest() {
|
|
lateinit var mariaDB: KMariadbContainer
|
|
|
|
@AfterAll
|
|
fun stopMariaDB() {
|
|
mariaDB.stop()
|
|
}
|
|
|
|
override fun dataSourceConfig(): DataSourceConfig {
|
|
mariaDB = KMariadbContainer()
|
|
mariaDB.start()
|
|
return mariadbDataSourceConfig(mariaDB.jdbcUrl)
|
|
}
|
|
}
|