diff --git a/.github/workflows/backend-cd-dev.yml b/.github/workflows/backend-cd-dev.yml index a71007822..cea5097d1 100644 --- a/.github/workflows/backend-cd-dev.yml +++ b/.github/workflows/backend-cd-dev.yml @@ -13,6 +13,9 @@ env: jobs: build-and-push: runs-on: ubuntu-latest + env: + TZ: 'Asia/Seoul' + defaults: run: working-directory: backend @@ -27,6 +30,11 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Check system timezone + run: | + echo "Current date and time: $(date)" + echo "TZ environment variable: $TZ" + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/backend-cd-prod.yml b/.github/workflows/backend-cd-prod.yml index b8441beb0..0a38d4d8a 100644 --- a/.github/workflows/backend-cd-prod.yml +++ b/.github/workflows/backend-cd-prod.yml @@ -15,6 +15,8 @@ jobs: build-and-push: if: github.event.pull_request.merged == true runs-on: ubuntu-latest + env: + TZ: 'Asia/Seoul' defaults: run: @@ -31,6 +33,11 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Check system timezone + run: | + echo "Current date and time: $(date)" + echo "TZ environment variable: $TZ" + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/backend-ci-dev.yml b/.github/workflows/backend-ci-dev.yml index f405bb430..fcd979759 100644 --- a/.github/workflows/backend-ci-dev.yml +++ b/.github/workflows/backend-ci-dev.yml @@ -9,8 +9,9 @@ on: jobs: build-and-push: - runs-on: ubuntu-latest + env: + TZ: 'Asia/Seoul' defaults: run: @@ -25,6 +26,11 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Check system timezone + run: | + echo "Current date and time: $(date)" + echo "TZ environment variable: $TZ" + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/backend-ci-prod.yml b/.github/workflows/backend-ci-prod.yml index 27681bba1..4c649c876 100644 --- a/.github/workflows/backend-ci-prod.yml +++ b/.github/workflows/backend-ci-prod.yml @@ -1,4 +1,4 @@ -name: backend-ci-dev +name: backend-ci-prod on: pull_request: @@ -9,8 +9,9 @@ on: jobs: build-and-push: - runs-on: ubuntu-latest + env: + TZ: 'Asia/Seoul' defaults: run: @@ -25,6 +26,11 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Check system timezone + run: | + echo "Current date and time: $(date)" + echo "TZ environment variable: $TZ" + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/backend/build.gradle b/backend/build.gradle index d6fa2f7b2..4c5548c49 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -1,76 +1,77 @@ plugins { - id 'java' - id 'jacoco' //테스트 커버리지 검증 라이브러리 추가 - id 'org.springframework.boot' version '3.3.1' - id 'io.spring.dependency-management' version '1.1.5' + id 'java' + id 'jacoco' //테스트 커버리지 검증 라이브러리 추가 + id 'org.springframework.boot' version '3.3.1' + id 'io.spring.dependency-management' version '1.1.5' + id 'com.palantir.docker-compose' version '0.36.0' } group = 'com.ody' version = '0.0.1-SNAPSHOT' java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +dockerCompose { + dockerComposeFile 'docker-compose-local.yml' } jacoco { - toolVersion = '0.8.8' + toolVersion = '0.8.8' } jacocoTestReport { - jacocoTestReport { - reports { - xml.required.set(true) - csv.required.set(false) - html.required.set(true) - } - } + reports { + xml.required.set(true) + csv.required.set(false) + html.required.set(true) + } } configurations { - compileOnly { - extendsFrom annotationProcessor - } + compileOnly { + extendsFrom annotationProcessor + } } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation 'com.google.firebase:firebase-admin:9.2.0' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' - implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' - implementation 'org.springframework.boot:spring-boot-starter' - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation "io.jsonwebtoken:jjwt:0.9.1" - implementation 'javax.xml.bind:jaxb-api:2.3.1' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - runtimeOnly 'com.mysql:mysql-connector-j:8.4.0' - runtimeOnly 'com.h2database:h2' + implementation 'com.google.firebase:firebase-admin:9.2.0' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' + implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' + implementation 'org.springframework.boot:spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation "io.jsonwebtoken:jjwt:0.9.1" + implementation 'javax.xml.bind:jaxb-api:2.3.1' + implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'org.flywaydb:flyway-mysql' + implementation 'org.flywaydb:flyway-core' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'io.rest-assured:rest-assured:5.3.1' + runtimeOnly 'com.mysql:mysql-connector-j:8.4.0' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' - testRuntimeOnly 'com.h2database:h2' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'io.rest-assured:rest-assured:5.3.1' - annotationProcessor 'org.projectlombok:lombok' - compileOnly 'org.projectlombok:lombok' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testRuntimeOnly 'com.h2database:h2' - implementation 'org.flywaydb:flyway-mysql' - implementation 'org.flywaydb:flyway-core' + annotationProcessor 'org.projectlombok:lombok' + compileOnly 'org.projectlombok:lombok' } tasks.named('test') { - useJUnitPlatform() - finalizedBy jacocoTestReport + useJUnitPlatform() + finalizedBy jacocoTestReport } configurations.all { - exclude group: 'commons-logging', module: 'commons-logging' + exclude group: 'commons-logging', module: 'commons-logging' } diff --git a/backend/docker-compose-local.yml b/backend/docker-compose-local.yml new file mode 100644 index 000000000..c7f0c4d2a --- /dev/null +++ b/backend/docker-compose-local.yml @@ -0,0 +1,12 @@ +services: + db: + image: mysql:8.0.35 + container_name: mysql-local-db + restart: always + ports: + - "53306:3306" + environment: + MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: 1234 + MYSQL_DATABASE: ody + TZ: Asia/seoul diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml deleted file mode 100644 index ea8c299cc..000000000 --- a/backend/docker-compose.yml +++ /dev/null @@ -1,34 +0,0 @@ -services: - db: - image: mysql:latest - container_name: ody-dev-db - restart: always - ports: - - "3306:3306" - environment: - MYSQL_ROOT_HOST: '%' - MYSQL_ROOT_PASSWORD: ${DEV_MYSQL_PASSWORD} - MYSQL_DATABASE: ody - volumes: - - ody-dev-db-vol:/var/lib/mysql - platform: linux/arm64 - healthcheck: - test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] - interval: 10s - timeout: 30s - retries: 5 - - web: - image: ${DOCKERHUB_USERNAME}/${DOCKERHUB_REPOSITORY}:${GIT_SHA}-dev - container_name: ody-dev-app - ports: - - "8080:8080" - volumes: - - /var/logs/ody-dev-logs:/ody-dev-logs - platform: linux/arm64 - depends_on: - db: - condition: service_healthy - -volumes: - ody-dev-db-vol: diff --git a/backend/src/main/java/com/ody/eta/repository/EtaRepository.java b/backend/src/main/java/com/ody/eta/repository/EtaRepository.java index 7c8e76057..b17d7292d 100644 --- a/backend/src/main/java/com/ody/eta/repository/EtaRepository.java +++ b/backend/src/main/java/com/ody/eta/repository/EtaRepository.java @@ -11,10 +11,10 @@ public interface EtaRepository extends JpaRepository { Optional findByMateId(Long id); @Query(""" - select e from Eta e - join Mate ma on e.mate.id = ma.id - join Meeting me on e.mate.meeting.id = me.id - where me.id = :meetingId + select e from Eta e + join Mate ma on e.mate.id = ma.id + join Meeting me on e.mate.meeting.id = me.id + where me.id = :meetingId """) List findAllByMeetingId(Long meetingId); } diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml index 49e7040a8..3f0769d79 100644 --- a/backend/src/main/resources/application-dev.yml +++ b/backend/src/main/resources/application-dev.yml @@ -2,14 +2,13 @@ spring: jpa: hibernate: ddl-auto: validate - sql: - init: - mode: never datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: ENC(KUJNgDMlvi/imeVHjCO2QekgI4DNxZT9IrW0QlVVkJXJUUQ2DAUOqI91FVH7aFhXVCsfXtf0EUmF/JqN3GpXa/mVj3o4BNbqS3QsU50BgwEEodko+VwHY2ebDHUxlKA1/FXBSmu6p+Rd3rcNEzoBIA==) username: ENC(jNYhZN6xMCmPQ7GZM+Hu3A==) password: ENC(VRtr3RjM+XnPvRdLjrPMHyTSzDlEjR7o) + flyway: + baseline-version: 2 log: file: diff --git a/backend/src/main/resources/application-local.yml b/backend/src/main/resources/application-local.yml index cd64f52f0..c5e37b35e 100644 --- a/backend/src/main/resources/application-local.yml +++ b/backend/src/main/resources/application-local.yml @@ -1,22 +1,17 @@ spring: - h2: - console: - enabled: true - path: /h2-console - settings: - web-allow-others: true datasource: - driver-class-name: org.h2.Driver - url: jdbc:h2:mem:database?serverTimezone=Asia/Seoul;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=TRUE - username: sa - password: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:53306/ody + username: root + password: 1234 + flyway: + url: jdbc:mysql://localhost:53306/ody + user: root + password: 1234 + connect-retries: 30 jpa: hibernate: ddl-auto: validate - dialect: org.hibernate.dialect.MySQLDialect - sql: - init: - mode: always log: file: diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 63cb4ee87..9fcc558e7 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -13,6 +13,8 @@ spring: jdbc-url: jdbc:mysql://database-project.cluster-ro-cqsc6pyqhwww.ap-northeast-2.rds.amazonaws.com:3306/ody username: ody password: ENC(2n3gUzzFjknXpHDYwuF4d5BQw6XqLdsX) + flyway: + baseline-version: 2 log: file: diff --git a/backend/src/main/resources/common.yml b/backend/src/main/resources/common.yml index a8286479b..49da783fb 100644 --- a/backend/src/main/resources/common.yml +++ b/backend/src/main/resources/common.yml @@ -23,7 +23,6 @@ springdoc: odsay: url: https://api.odsay.com/v1/api/searchPubTransPathT api-key: ENC(4+ag02XbL8zS6rWoWHh7WzhKqBj5kaBwBcg04MpLr8nLJefO2PRY8E5o0WpRd3oRtvFv1s9lnWI=) - # TODO: 임시로 개인 api-key 추가 -> 팀 key로 변경 필요 google: maps: diff --git a/backend/src/main/resources/db/migration/V2__alter_notification_type_check.sql b/backend/src/main/resources/db/migration/V2__alter_notification_type_check.sql index 43ea8682a..953f1bbb7 100644 --- a/backend/src/main/resources/db/migration/V2__alter_notification_type_check.sql +++ b/backend/src/main/resources/db/migration/V2__alter_notification_type_check.sql @@ -1 +1,3 @@ -ALTER TABLE notification ADD CONSTRAINT notification_chk_1 CHECK (notification.type IN ('DEPARTURE_REMINDER', 'ENTRY', 'NUDGE', 'MEMBER_DELETION', 'ETA_NOTICE')); +ALTER TABLE notification DROP CONSTRAINT notification_chk_1; + +ALTER TABLE notification ADD CONSTRAINT notification_chk_1 CHECK (`type` IN ('DEPARTURE_REMINDER', 'ENTRY', 'NUDGE', 'MEMBER_DELETION', 'ETA_NOTICE')); diff --git a/backend/src/main/resources/db/migration/V3__alter_character_set.sql b/backend/src/main/resources/db/migration/V3__alter_character_set.sql index 1f1b44532..5b11ad175 100644 --- a/backend/src/main/resources/db/migration/V3__alter_character_set.sql +++ b/backend/src/main/resources/db/migration/V3__alter_character_set.sql @@ -1,6 +1,6 @@ -/*! ALTER DATABASE ody CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; */ -/*! ALTER TABLE member CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ -/*! ALTER TABLE meeting CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ -/*! ALTER TABLE mate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ -/*! ALTER TABLE notification CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ -/*! ALTER TABLE eta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; */ +ALTER DATABASE ody CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; +ALTER TABLE member CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE meeting CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE mate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE notification CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +ALTER TABLE eta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/backend/src/main/resources/db/migration/V5__alter__timestamp__set-nano.sql b/backend/src/main/resources/db/migration/V5__alter__timestamp__set-nano.sql index 668122cac..ab4385ff6 100644 --- a/backend/src/main/resources/db/migration/V5__alter__timestamp__set-nano.sql +++ b/backend/src/main/resources/db/migration/V5__alter__timestamp__set-nano.sql @@ -1,10 +1,10 @@ -/*! ALTER TABLE member MODIFY COLUMN deleted_at timestamp(6); */ -/*! ALTER TABLE meeting MODIFY COLUMN created_at timestamp(6); */ -/*! ALTER TABLE meeting MODIFY COLUMN updated_at timestamp(6); */ -/*! ALTER TABLE mate MODIFY COLUMN deleted_at timestamp(6); */ -/*! ALTER TABLE eta CHANGE COLUMN created_at first_api_call_at timestamp not null; */ -/*! ALTER TABLE eta CHANGE COLUMN updated_at last_api_call_at timestamp not null; */ -/*! ALTER TABLE eta MODIFY COLUMN deleted_at timestamp(6); */ -/*! ALTER TABLE notification MODIFY COLUMN send_at timestamp(6); */ -/*! ALTER TABLE notification MODIFY COLUMN created_at timestamp(6); */ -/*! ALTER TABLE notification MODIFY COLUMN updated_at timestamp(6); */ +ALTER TABLE member MODIFY COLUMN deleted_at timestamp(6); +ALTER TABLE meeting MODIFY COLUMN created_at timestamp(6); +ALTER TABLE meeting MODIFY COLUMN updated_at timestamp(6); +ALTER TABLE mate MODIFY COLUMN deleted_at timestamp(6); +ALTER TABLE eta CHANGE COLUMN created_at first_api_call_at timestamp not null; +ALTER TABLE eta CHANGE COLUMN updated_at last_api_call_at timestamp not null; +ALTER TABLE eta MODIFY COLUMN deleted_at timestamp(6); +ALTER TABLE notification MODIFY COLUMN send_at timestamp(6); +ALTER TABLE notification MODIFY COLUMN created_at timestamp(6); +ALTER TABLE notification MODIFY COLUMN updated_at timestamp(6); diff --git a/backend/src/test/java/com/ody/common/BaseRepositoryTest.java b/backend/src/test/java/com/ody/common/BaseRepositoryTest.java index 27eea2acd..66a9a8e65 100644 --- a/backend/src/test/java/com/ody/common/BaseRepositoryTest.java +++ b/backend/src/test/java/com/ody/common/BaseRepositoryTest.java @@ -14,8 +14,8 @@ import org.springframework.test.context.ActiveProfiles; @Import({JpaAuditingConfig.class, FixtureGeneratorConfig.class, TestAuthConfig.class}) -@ActiveProfiles("test") @DataJpaTest +@ActiveProfiles("test") public abstract class BaseRepositoryTest { @Autowired diff --git a/backend/src/test/java/com/ody/common/DatabaseCleaner.java b/backend/src/test/java/com/ody/common/DatabaseCleaner.java index 1bab34d2a..a3b74d5d2 100644 --- a/backend/src/test/java/com/ody/common/DatabaseCleaner.java +++ b/backend/src/test/java/com/ody/common/DatabaseCleaner.java @@ -1,13 +1,25 @@ package com.ody.common; +import jakarta.persistence.Entity; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import com.google.common.base.CaseFormat; @Component public class DatabaseCleaner { + private static final String FOREIGN_KEY_CHECK_OFF = "SET FOREIGN_KEY_CHECKS = 0"; + private static final String FOREIGN_KEY_CHECK_ON = "SET FOREIGN_KEY_CHECKS = 1"; + private static final String TRUNCATE_TABLE_FORMAT = "TRUNCATE TABLE %s"; + private static final String ALTER_TABLE_AUTO_INCREMENT_FORMAT = "ALTER TABLE %s AUTO_INCREMENT = %d"; + + private List tableNames = new ArrayList<>(); + @PersistenceContext private EntityManager entityManager; @@ -15,78 +27,25 @@ public DatabaseCleaner(EntityManager entityManager) { this.entityManager = entityManager; } - @Transactional - public void cleanUp() { - cleanNotification(); - cleanEta(); - cleanMate(); - cleanMeeting(); - cleanMember(); - cleanApiCall(); - } - - private void cleanNotification() { - entityManager.createNativeQuery("DELETE FROM notification") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE notification ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); - - entityManager.flush(); - entityManager.clear(); - } - - private void cleanEta() { - entityManager.createNativeQuery("DELETE FROM eta") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE eta ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); - - entityManager.flush(); - entityManager.clear(); - } - - - private void cleanMate() { - entityManager.createNativeQuery("DELETE FROM mate") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE mate ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); - - entityManager.flush(); - entityManager.clear(); - } - - private void cleanMeeting() { - entityManager.createNativeQuery("DELETE FROM meeting") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE meeting ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); - - entityManager.flush(); - entityManager.clear(); + @PostConstruct + void findTablesNames() { + this.tableNames = entityManager.getMetamodel() + .getEntities().stream() + .filter(entityType -> entityType.getJavaType().getAnnotation(Entity.class) != null) + .map(entityType -> CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, entityType.getName())) + .toList(); } - private void cleanMember() { - entityManager.createNativeQuery("DELETE FROM member") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE member ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); - - entityManager.flush(); - entityManager.clear(); - } - - private void cleanApiCall() { - entityManager.createNativeQuery("DELETE FROM api_call") - .executeUpdate(); - - entityManager.createNativeQuery("ALTER TABLE api_call ALTER COLUMN id RESTART WITH 1") - .executeUpdate(); + @Transactional + public void cleanUp() { + entityManager.createNativeQuery(FOREIGN_KEY_CHECK_OFF).executeUpdate(); + + for (String tableName : tableNames) { + entityManager.createNativeQuery(String.format(TRUNCATE_TABLE_FORMAT, tableName)).executeUpdate(); + entityManager.createNativeQuery(String.format(ALTER_TABLE_AUTO_INCREMENT_FORMAT, tableName, 1)) + .executeUpdate(); + } + entityManager.createNativeQuery(FOREIGN_KEY_CHECK_ON).executeUpdate(); entityManager.flush(); entityManager.clear(); diff --git a/backend/src/test/java/com/ody/eta/repository/EtaRepositoryTest.java b/backend/src/test/java/com/ody/eta/repository/EtaRepositoryTest.java index c92bb3c4f..eee48a001 100644 --- a/backend/src/test/java/com/ody/eta/repository/EtaRepositoryTest.java +++ b/backend/src/test/java/com/ody/eta/repository/EtaRepositoryTest.java @@ -41,12 +41,12 @@ void findAllByMeetingId() { etaRepository.save(new Eta(odyMate2, 15L)); etaRepository.save(new Eta(sojuMate, 20L)); - List sojuMeetingEtas = etaRepository.findAllByMeetingId(sojuMeeting.getId()); List odyMeetingEtas = etaRepository.findAllByMeetingId(odyMeeting.getId()); + List sojuMeetingEtas = etaRepository.findAllByMeetingId(sojuMeeting.getId()); assertAll( - () -> assertThat(sojuMeetingEtas).hasSize(1), - () -> assertThat(odyMeetingEtas).hasSize(2) + () -> assertThat(odyMeetingEtas).hasSize(2), + () -> assertThat(sojuMeetingEtas).hasSize(1) ); } @@ -57,7 +57,7 @@ void delete() { etaRepository.delete(eta); - Eta actual = (Eta) entityManager.createNativeQuery("select * from Eta where id = ?", Eta.class) + Eta actual = (Eta) entityManager.createNativeQuery("select * from eta where id = ?", Eta.class) .setParameter(1, eta.getId()) .getSingleResult(); assertThat(actual.getDeletedAt()).isNotNull(); diff --git a/backend/src/test/java/com/ody/member/repository/MemberRepositoryTest.java b/backend/src/test/java/com/ody/member/repository/MemberRepositoryTest.java index df7fc2a4c..74b6d8f9e 100644 --- a/backend/src/test/java/com/ody/member/repository/MemberRepositoryTest.java +++ b/backend/src/test/java/com/ody/member/repository/MemberRepositoryTest.java @@ -1,11 +1,8 @@ package com.ody.member.repository; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertAll; import com.ody.common.BaseRepositoryTest; -import com.ody.common.Fixture; -import com.ody.member.domain.DeviceToken; import com.ody.member.domain.Member; import java.util.Optional; import org.junit.jupiter.api.DisplayName; diff --git a/backend/src/test/resources/application.yml b/backend/src/test/resources/application.yml index ae3c7f80c..1029c872c 100644 --- a/backend/src/test/resources/application.yml +++ b/backend/src/test/resources/application.yml @@ -1,10 +1,4 @@ spring: - h2: - console: - enabled: true - path: /h2-console - settings: - web-allow-others: true datasource: url: jdbc:h2:mem:database;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=TRUE username: sa @@ -14,13 +8,11 @@ spring: show-sql: true hibernate: ddl-auto: create-drop - dialect: org.hibernate.dialect.MySQLDialect properties: hibernate: format_sql: true - sql: - init: - schema-locations: + flyway: + enabled: false odsay: url: https://api.odsay.com/v1/api/searchPubTransPathT