improve-tests #28
@@ -71,17 +71,7 @@ data class Function(
|
||||
it.sendQuery("ROLLBACK")
|
||||
}.join()
|
||||
|
||||
return Status.OK // TODO
|
||||
}
|
||||
|
||||
override fun status(): Status {
|
||||
connection.inTransaction {
|
||||
up()
|
||||
down()
|
||||
it.sendQuery("ROLLBACK")
|
||||
}.join()
|
||||
|
||||
return Status.OK // TODO
|
||||
return Status.OK
|
||||
}
|
||||
|
||||
fun copy(): Function {
|
||||
|
||||
@@ -44,17 +44,7 @@ data class MigrationScript(
|
||||
it.sendQuery("ROLLBACK")
|
||||
}.join()
|
||||
|
||||
return Migration.Status.OK // TODO
|
||||
}
|
||||
|
||||
override fun status(): Migration.Status {
|
||||
connection.inTransaction {
|
||||
up()
|
||||
down()
|
||||
it.sendQuery("ROLLBACK")
|
||||
}.join()
|
||||
|
||||
return Migration.Status.OK // TODO
|
||||
return Migration.Status.OK
|
||||
}
|
||||
|
||||
fun copy(): MigrationScript {
|
||||
|
||||
@@ -28,7 +28,6 @@ interface Migration {
|
||||
fun up(): Status
|
||||
fun down(): Status
|
||||
fun test(): Status
|
||||
fun status(): Status
|
||||
|
||||
enum class Status(i: Int) { OK(2), UP_FAIL(0), DOWN_FAIL(1) }
|
||||
enum class Action { OK, UP, DOWN }
|
||||
|
||||
@@ -45,6 +45,16 @@ class RequesterTest : TestAbstract() {
|
||||
assertEquals("DeleteTest", name)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `function toString`() {
|
||||
val resources = this::class.java.getResource("/sql/function/Test").toURI()
|
||||
val name: String = Requester(connection, functionsDirectory = resources)
|
||||
.getFunction("test_function")
|
||||
.toString()
|
||||
|
||||
assertEquals("test_function", name)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `add function as string`() {
|
||||
val sql = """
|
||||
|
||||
Reference in New Issue
Block a user