diff --git a/src/intTest/kotlin/mastodon/timelines/TimelineApiTest.kt b/src/intTest/kotlin/mastodon/timelines/TimelineApiTest.kt index 0a888cb9..acd16991 100644 --- a/src/intTest/kotlin/mastodon/timelines/TimelineApiTest.kt +++ b/src/intTest/kotlin/mastodon/timelines/TimelineApiTest.kt @@ -1,6 +1,8 @@ package mastodon.timelines import dev.usbharu.hideout.SpringApplication +import org.flywaydb.core.Flyway +import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired @@ -101,4 +103,13 @@ class TimelineApiTest { .asyncDispatch() .andExpect { status { isOk() } } } + + companion object { + @JvmStatic + @AfterAll + fun dropDatabase(@Autowired flyway: Flyway) { + flyway.clean() + flyway.migrate() + } + } }