diff --git a/.github/workflows/testcode.yml b/.github/workflows/testcode.yml index 214c9348..48bd8beb 100644 --- a/.github/workflows/testcode.yml +++ b/.github/workflows/testcode.yml @@ -49,6 +49,6 @@ jobs: SPRING_DATASOURCE_URL: ${{ secrets.MYSQL_URL }} SPRING_DATASOURCE_USERNAME: ${{ secrets.MYSQL_USERNAME }} SPRING_DATASOURCE_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} - SPRING_JPA_HIBERNATE_DDL_AUTO: "update" + SPRING_JPA_HIBERNATE_DDL_AUTO: "create" JWT_SECRET: ${{ secrets.JWT_SECRET }} run: ./gradlew test diff --git a/src/test/java/com/example/sinitto/SinittoApplicationTests.java b/src/test/java/com/example/sinitto/SinittoApplicationTests.java index be2f259e..1b741ff8 100644 --- a/src/test/java/com/example/sinitto/SinittoApplicationTests.java +++ b/src/test/java/com/example/sinitto/SinittoApplicationTests.java @@ -3,10 +3,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.transaction.annotation.Transactional; import static org.hibernate.validator.internal.util.Contracts.assertNotNull; @SpringBootTest +@Transactional class SinittoApplicationTests { @Value("${jwt.secret}")