From f7a9dd00e3cc679def5c3ab94bc7a1882714637b Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:19:44 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/mastodon/timelines/TimelineApiTest.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) 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() + } + } }