fix: resource dir

This commit is contained in:
2019-08-02 19:32:12 +02:00
parent cddb4c352b
commit 56a141a34c
5 changed files with 50 additions and 67 deletions

View File

@@ -32,18 +32,6 @@ class MigrationTest(): TestAbstract() {
} shouldThrow Migrations.DownMigrationNotDefined::class
}
@Test
fun `run forced down query`() {
val resources = File(this::class.java.getResource("/sql/migrations").toURI())
val m = Migrations(resources, getConnextion())
repeat(3) {
m.down(true).apply {
this `should contain` Pair("1", Migration.Status.OK)
size `should be equal to` 1
}
}
}
@Test
fun `run dry migrations`() {
val resources = File(this::class.java.getResource("/sql/real_migrations").toURI())
@@ -77,6 +65,11 @@ class MigrationTest(): TestAbstract() {
@Test
fun `run migrations force down`() {
val resources = File(this::class.java.getResource("/sql/real_migrations").toURI())
Migrations(resources, getConnextion()).apply {
up().apply {
size `should be equal to` 1
}
}
Migrations(resources, getConnextion()).apply {
forceAllDown().apply {
size `should be equal to` 1