From d86bbda1de1e02d11018e01257371b896331da67 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 18 Mar 2024 20:20:48 +0900 Subject: [PATCH 01/16] =?UTF-8?q?[ADD]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=99=98=EA=B2=BD=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/build.gradle | 6 ++ main/src/main/resources/application-test.yml | 55 +++++++++++++++++++ .../crew/main/MainApplicationTests.java | 9 ++- 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 main/src/main/resources/application-test.yml diff --git a/main/build.gradle b/main/build.gradle index 657a05e4..2dda3449 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -41,6 +41,12 @@ dependencies { implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5' implementation 'com.auth0:java-jwt:4.4.0' + // h2 + runtimeOnly 'com.h2database:h2' + + // mac m1 setting + implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' + implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.0.3' } diff --git a/main/src/main/resources/application-test.yml b/main/src/main/resources/application-test.yml new file mode 100644 index 00000000..3f008d4e --- /dev/null +++ b/main/src/main/resources/application-test.yml @@ -0,0 +1,55 @@ +server: +port: 4000 + +spring: + config: + activate: + on-profile: test + import: application-secret.properties + + datasource: + driver-class-name: org.h2.Driver + url: jdbc:h2:mem:testdb;MODE=PostgreSQL; + username: sa + password: + jpa: + hibernate: + naming: + physical-strategy: org.sopt.makers.crew.main.common.config.CamelCaseNamingStrategy + ddl-auto: none + properties: + hibernate: + show_sql: true + format_sql: ture + dialect: org.hibernate.dialect.H2Dialect + storage_engine: innodb + +jwt: + header: Authorization + secret: ${TEST_JWT_SECRET} + access-token: + expire-length: ${ACCESS_TOKEN_EXPIRED_TIME} # 10분 + +aws-property: + aws-region: ${AWS_REGION} + s3-bucket-name: ${AWS_S3_BUCKET_NAME} + access-key: ${AWS_ACCESS_KEY_ID} + secret-key: ${AWS_SECRET_ACCESS_KEY} + +springdoc: + packages-to-scan: org.sopt.makers.crew + default-consumes-media-type: application/json;charset=UTF-8 + default-produces-media-type: application/json;charset=UTF-8 + swagger-ui: + tags-sorter: alpha + operations-sorter: alpha + api-docs: + path: /api-docs/json + groups: + enabled: true + +push-notification: + web-url: ${DEV_WEB_PAGE_URL} + x-api-key: ${DEV_PUSH_API_KEY} + service: ${PUSH_NOTIFICATION_SERVICE} + push-server-url: ${DEV_PUSH_SERVER_URL} \ No newline at end of file diff --git a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java index 8152f9cd..e9a832fc 100644 --- a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java +++ b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java @@ -1,12 +1,15 @@ package org.sopt.makers.crew.main; +import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") class MainApplicationTests { - // @Test - // void contextLoads() { - // } + @Test + void contextLoads() { + } } From 329d30b885810c3c46972918602d96c2901c73e1 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 18 Mar 2024 23:15:50 +0900 Subject: [PATCH 02/16] =?UTF-8?q?[CHORE]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=99=98=EA=B2=BD=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/common/config/SecurityConfig.java | 25 +++++++++++++++++-- main/src/main/resources/application-test.yml | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java index e0a4cfdb..e7190288 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java +++ b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java @@ -14,6 +14,7 @@ import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @@ -51,8 +52,8 @@ SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception { (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll() - .requestMatchers(SWAGGER_URL).permitAll() + authorize -> authorize.requestMatchers(new AntPathRequestMatcher("/health/v2")).permitAll() + .requestMatchers(new AntPathRequestMatcher("/docs/**")).permitAll() .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), @@ -62,6 +63,26 @@ SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception { return http.build(); } + @Bean + @Profile("test") + SecurityFilterChain testSecurityFilterChain(HttpSecurity http) throws Exception { + http.csrf((csrfConfig) -> csrfConfig.disable()) + .cors(Customizer.withDefaults()) + .sessionManagement( + (sessionManagement) -> sessionManagement.sessionCreationPolicy( + SessionCreationPolicy.STATELESS)) + .authorizeHttpRequests( + authorize -> authorize.requestMatchers(new AntPathRequestMatcher("/h2-console")).permitAll() + .requestMatchers(new AntPathRequestMatcher("/docs/**")).permitAll() + .anyRequest().authenticated()) + .addFilterBefore( + new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), + UsernamePasswordAuthenticationFilter.class) + .exceptionHandling(exceptionHandling -> exceptionHandling + .authenticationEntryPoint(this.jwtAuthenticationEntryPoint)); + return http.build(); + } + @Bean @Profile("prod") SecurityFilterChain prodSecurityFilterChain(HttpSecurity http) throws Exception { diff --git a/main/src/main/resources/application-test.yml b/main/src/main/resources/application-test.yml index 3f008d4e..fc2cd7f6 100644 --- a/main/src/main/resources/application-test.yml +++ b/main/src/main/resources/application-test.yml @@ -1,5 +1,5 @@ server: -port: 4000 + port: 4000 spring: config: From 910fa0e2d3505075e6e88a15e6bc2b1c8a4a0297 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 16:12:28 +0900 Subject: [PATCH 03/16] =?UTF-8?q?[ADD]=20ignore=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/main/.gitignore b/main/.gitignore index 166946ba..9f8add33 100644 --- a/main/.gitignore +++ b/main/.gitignore @@ -19,6 +19,7 @@ bin/ ### IntelliJ IDEA ### .idea +.idea/ *.iws *.iml *.ipr From 2e1336c42a1fccf3a1b3bb2881ae513430a7f812 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 16:25:43 +0900 Subject: [PATCH 04/16] =?UTF-8?q?[DEL]=20=EC=95=88=EC=93=B0=EB=8A=94=20yml?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/tt.yml | 41 ---------------------------- .github/workflows/main.yml | 55 -------------------------------------- 2 files changed, 96 deletions(-) delete mode 100644 .github/tt.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/tt.yml b/.github/tt.yml deleted file mode 100644 index 495c9347..00000000 --- a/.github/tt.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: map_test -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - - name: Generate deployment package - run: zip -r deploy.zip . - - - name: Get timestamp - uses: gerred/actions/current-time@master - id: current-time - - - name: Run string replace - uses: frabert/replace-string-action@master - id: format-time - with: - pattern: '[:\.]+' - string: '${{ steps.current-time.outputs.time }}' - replace-with: '-' - flags: 'g' - - - name: Beanstalk Deploy for app - uses: einaregilsson/beanstalk-deploy@v16 - with: - aws_access_key: ${{secrets.AWS_ACCESS_KEY_ID}} - aws_secret_key: ${{secrets.AWS_SECRET_ACCESS_KEY}} - application_name: makers.web - environment_name: Makersweb-env - region: ap-northeast-2 - version_label: 'makers-${{ steps.format-time.outputs.replaced }}' - deployment_package: deploy.zip - - - name: Deployed! - run: echo App deployed to ELB diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bbc94ff8..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI/CD Docker - -on: - push: - branches: [main, develop] -env: - DOCKER_IMAGE: ghcr.io/sopt-makers/sopt-web-product-backend - VERSION: ${{ github.sha }} - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Check out source code - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Cache docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VERSION }} # runner 설정에서 읽어들일거에요. - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to ghcr - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CR_PAT }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }} - - deploy: - needs: build - name: Deploy - runs-on: [self-hosted, label-development] - steps: - - name: Login to ghcr - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CR_PAT }} - - name: Docker run - run: | - docker ps -q --filter "name=web_docker" | grep -q . && docker stop web_docker && docker rm -fv web_docker - docker run -d -p 8080:8080 --name cicd --restart always ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }} From 62c2222672763dea32ced39b1812cb66ecfa52a5 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 16:26:18 +0900 Subject: [PATCH 05/16] =?UTF-8?q?[ADD]=20gitignore=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 600d2d33..b8f22461 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode \ No newline at end of file +.vscode +/.idea/ From 1df86a7317e2f1b3a800be142e4bb6973753ea61 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 21:54:52 +0900 Subject: [PATCH 06/16] =?UTF-8?q?[FEAT]=20=EC=9C=A0=EC=A0=80=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crew/main/entity/user/UserFixture.java | 22 ++++++++++++ .../main/entity/user/UserRepositoryTest.java | 34 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java create mode 100644 main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java diff --git a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java new file mode 100644 index 00000000..1510fa78 --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java @@ -0,0 +1,22 @@ +package org.sopt.makers.crew.main.entity.user; + +import java.util.ArrayList; +import java.util.List; +import org.sopt.makers.crew.main.entity.user.enums.UserPart; +import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO; + +public class UserFixture { + + public static User createStaticUser() { + List activityVOS = new ArrayList<>(); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 33)); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 34)); + + return User.builder() + .name("송민규") + .orgId(1) + .activities(activityVOS) + .phone("010-9472-6796") + .build(); + } +} diff --git a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java new file mode 100644 index 00000000..95cc574d --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java @@ -0,0 +1,34 @@ +package org.sopt.makers.crew.main.entity.user; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.jdbc.Sql; + +@DataJpaTest +@ActiveProfiles("test") +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) +@Sql(scripts = "classpath:schema.sql") +public class UserRepositoryTest { + + @Autowired + private UserRepository userRepository; + + @Test + void 유저저장_성공(){ + // given + User user = UserFixture.createStaticUser(); + + // when + User savedUser = userRepository.save(user); + + // then + Assertions.assertThat(savedUser) + .extracting("name", "phone") + .containsExactly(user.getName(), user.getPhone()); + } +} From 8af70e4c2dafc341c930dee8340afb225d33b414 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 21:55:04 +0900 Subject: [PATCH 07/16] =?UTF-8?q?[FIX]=20final=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/makers/crew/main/entity/user/vo/UserActivityVO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java b/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java index e1d0ae9a..b18a1f12 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java @@ -9,7 +9,7 @@ @ToString public class UserActivityVO { - private String part; - private int generation; + private final String part; + private final int generation; } From 89334e68d3234d90a820267a8f128a301a3b7ba2 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 21:55:24 +0900 Subject: [PATCH 08/16] =?UTF-8?q?[CHORE]=20h2=20->=20=EC=9D=B8=EB=A9=94?= =?UTF-8?q?=EB=AA=A8=EB=A6=AC=20db=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/main/resources/application-test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/main/src/main/resources/application-test.yml b/main/src/main/resources/application-test.yml index fc2cd7f6..c7599375 100644 --- a/main/src/main/resources/application-test.yml +++ b/main/src/main/resources/application-test.yml @@ -6,12 +6,11 @@ spring: activate: on-profile: test import: application-secret.properties - datasource: - driver-class-name: org.h2.Driver - url: jdbc:h2:mem:testdb;MODE=PostgreSQL; - username: sa - password: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://localhost:5432/postgres + username: songmingyu + password: 1234 jpa: hibernate: naming: @@ -21,8 +20,12 @@ spring: hibernate: show_sql: true format_sql: ture - dialect: org.hibernate.dialect.H2Dialect + dialect: org.hibernate.dialect.PostgreSQLDialect storage_engine: innodb + sql: + init: + mode: always + schema-locations: classpath:schema.sql jwt: header: Authorization From 405157b70ae0c1f4983894e11c0508770b798e95 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 23:03:38 +0900 Subject: [PATCH 09/16] =?UTF-8?q?[CHORE]=20SecurityConfig=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/common/config/SecurityConfig.java | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java index e7190288..42e8f800 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java +++ b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java @@ -1,6 +1,7 @@ package org.sopt.makers.crew.main.common.config; import java.util.Arrays; +import java.util.stream.Stream; import lombok.RequiredArgsConstructor; import org.sopt.makers.crew.main.common.config.jwt.JwtAuthenticationEntryPoint; import org.sopt.makers.crew.main.common.config.jwt.JwtAuthenticationFilter; @@ -52,8 +53,14 @@ SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception { (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(new AntPathRequestMatcher("/health/v2")).permitAll() - .requestMatchers(new AntPathRequestMatcher("/docs/**")).permitAll() + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), @@ -72,8 +79,14 @@ SecurityFilterChain testSecurityFilterChain(HttpSecurity http) throws Exception (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(new AntPathRequestMatcher("/h2-console")).permitAll() - .requestMatchers(new AntPathRequestMatcher("/docs/**")).permitAll() + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), @@ -92,9 +105,15 @@ SecurityFilterChain prodSecurityFilterChain(HttpSecurity http) throws Exception (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll() - .requestMatchers(SWAGGER_URL).permitAll() - .anyRequest().authenticated()) + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), UsernamePasswordAuthenticationFilter.class) From 6b86583faeceb677ddac1cc7ea7d872dcae8ee67 Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 25 Mar 2024 23:56:40 +0900 Subject: [PATCH 10/16] =?UTF-8?q?[CHORE]=20=ED=99=94=EC=9D=B4=ED=8A=B8?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20url=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/sopt/makers/crew/main/common/config/SecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java index 42e8f800..2ede5aa4 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java +++ b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java @@ -41,7 +41,7 @@ public class SecurityConfig { private static final String[] AUTH_WHITELIST = { "/health", - "meeting/v2/org-user/**" + "/meeting/v2/org-user/**" }; @Bean From e406bde7e8c406daf3727f7266a335ed34c51217 Mon Sep 17 00:00:00 2001 From: mikekks Date: Fri, 29 Mar 2024 23:34:37 +0900 Subject: [PATCH 11/16] =?UTF-8?q?[ADD]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BB=A8=ED=85=8C=EC=9D=B4=EB=84=88=20=ED=99=98=EA=B2=BD=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/build.gradle | 13 ++++++++++++- .../crew/main/entity/meeting/Meeting.java | 5 ++++- .../makers/crew/main/entity/user/User.java | 4 +++- main/src/main/resources/application-test.yml | 19 ++++++++----------- .../crew/main/MainApplicationTests.java | 5 +++++ 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/main/build.gradle b/main/build.gradle index 2dda3449..acd275d4 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -24,7 +24,6 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' // https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui - implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.5' implementation 'org.springframework.boot:spring-boot-starter-actuator' @@ -36,6 +35,9 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation group: 'org.postgresql', name: 'postgresql', version: '42.6.0' + // jsonb 타입 핸들링 위함 + implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0' + implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5' implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5' implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5' @@ -48,6 +50,15 @@ dependencies { implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.0.3' + + // test container + testImplementation 'org.testcontainers:testcontainers:1.17.3' // TC 의존성 + testImplementation 'org.testcontainers:junit-jupiter:1.16.2' // TC 의존성 + testImplementation 'org.testcontainers:postgresql:1.17.3' // PostgreSQL 컨테이너 사용 + testImplementation 'org.testcontainers:jdbc' // DB와의 JDBC connection + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0' + + } tasks.named('test') { diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java index cc1a48a2..b497947a 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java @@ -22,8 +22,10 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Parameter; import org.hibernate.annotations.Type; +import org.hibernate.type.SqlTypes; import org.sopt.makers.crew.main.entity.apply.Apply; import org.sopt.makers.crew.main.entity.meeting.converter.MeetingCategoryConverter; import org.sopt.makers.crew.main.entity.meeting.enums.EnMeetingStatus; @@ -80,8 +82,9 @@ public class Meeting { /** * 이미지 */ - @Column(name = "imageURL") + @Column(name = "imageURL",columnDefinition = "jsonb") @Type(JsonBinaryType.class) + //@JdbcTypeCode(SqlTypes.JSON) private List imageURL; /** diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java index da6e2530..8f35489d 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java @@ -17,7 +17,9 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Type; +import org.hibernate.type.SqlTypes; import org.sopt.makers.crew.main.entity.apply.Apply; import org.sopt.makers.crew.main.entity.like.Like; import org.sopt.makers.crew.main.entity.meeting.Meeting; @@ -54,7 +56,7 @@ public class User { /** * 활동 목록 */ - @Column(name = "activities") + @Column(name = "activities",columnDefinition = "jsonb") @Type(JsonBinaryType.class) private List activities; diff --git a/main/src/main/resources/application-test.yml b/main/src/main/resources/application-test.yml index c7599375..8415f784 100644 --- a/main/src/main/resources/application-test.yml +++ b/main/src/main/resources/application-test.yml @@ -1,3 +1,5 @@ + + server: port: 4000 @@ -7,25 +9,20 @@ spring: on-profile: test import: application-secret.properties datasource: - driver-class-name: org.postgresql.Driver - url: jdbc:postgresql://localhost:5432/postgres - username: songmingyu - password: 1234 + driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver + url: jdbc:tc:postgresql:///test-database + # username: root + # password: jpa: hibernate: naming: physical-strategy: org.sopt.makers.crew.main.common.config.CamelCaseNamingStrategy - ddl-auto: none + ddl-auto: create properties: hibernate: show_sql: true - format_sql: ture - dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true storage_engine: innodb - sql: - init: - mode: always - schema-locations: classpath:schema.sql jwt: header: Authorization diff --git a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java index e9a832fc..87edcd9c 100644 --- a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java +++ b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java @@ -1,11 +1,16 @@ package org.sopt.makers.crew.main; import org.junit.jupiter.api.Test; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; +import org.testcontainers.junit.jupiter.Testcontainers; + @SpringBootTest +@Testcontainers @ActiveProfiles("test") +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) class MainApplicationTests { @Test From b4d90d27ece82a697647a0a9d64912e9e07a6f67 Mon Sep 17 00:00:00 2001 From: mikekks Date: Sun, 31 Mar 2024 11:08:27 +0900 Subject: [PATCH 12/16] =?UTF-8?q?[ADD]=20Jacoco=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/build.gradle | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/main/build.gradle b/main/build.gradle index acd275d4..3b4d5fa7 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -2,6 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '3.1.5' id 'io.spring.dependency-management' version '1.1.3' + id 'jacoco' } group = 'org.sopt.makers.crew' @@ -63,6 +64,19 @@ dependencies { tasks.named('test') { useJUnitPlatform() + + finalizedBy jacocoTestCoverageVerification + + jacoco { + excludes += [ + "org/crew/main/MainApplication.class", + "**/response/*", + "**/config/*", + "**/dto/*", + "**/vo/*", + "**/exception/*", + ] + } } ext { @@ -75,4 +89,44 @@ dependencyManagement { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } +} + +jacocoTestReport { + reports { + xml.required.set(true) + csv.required.set(true) + html.required.set(true) + } + + afterEvaluate { + classDirectories.setFrom( + files(classDirectories.files.collect { + fileTree(dir: it, excludes: [ + "org/crew/main/MainApplication.class", + "**/response/*", + "**/config/*", + "org/crew/**/*Dto.*", + "**/dto/*", + "**/vo/*", + "**/exception/*", + ]) + }) + ) + } +} + +jacocoTestCoverageVerification { + violationRules { + rule { + // ... + + excludes = [ + '*.*Application', + '*.*Exception', + '*.Dto', + '*.response' + // ... + ] + } + } } \ No newline at end of file From 78ae6321f961f40c3aab79fc56b61dbda55ea028 Mon Sep 17 00:00:00 2001 From: mikekks Date: Sun, 31 Mar 2024 11:09:00 +0900 Subject: [PATCH 13/16] =?UTF-8?q?[TEST]=20=EB=82=B4=20=EB=AA=A8=EC=9E=84?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crew/main/entity/meeting/Meeting.java | 3 +- .../main/entity/meeting/vo/ImageUrlVO.java | 4 +- .../makers/crew/main/entity/user/User.java | 4 +- .../v2/service/MeetingV2ServiceTest.java | 136 ++++++++++++++++++ 4 files changed, 142 insertions(+), 5 deletions(-) create mode 100644 main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java index b497947a..2a84b1b4 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java @@ -187,7 +187,7 @@ public class Meeting { private List posts; @Builder - public Meeting(User user, Integer userId, String title, MeetingCategory category, + public Meeting(User user, Integer userId, List appliedInfo, String title, MeetingCategory category, List imageURL, LocalDateTime startDate, LocalDateTime endDate, Integer capacity, String desc, String processDesc, LocalDateTime mStartDate, LocalDateTime mEndDate, String leaderDesc, String targetDesc, String note, Boolean isMentorNeeded, @@ -195,6 +195,7 @@ public Meeting(User user, Integer userId, String title, MeetingCategory category Integer targetActiveGeneration, MeetingJoinablePart[] joinableParts) { this.user = user; this.userId = userId; + this.appliedInfo = appliedInfo; this.title = title; this.category = category; this.imageURL = imageURL; diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java index a51f4ff5..9f1bd23d 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java @@ -7,6 +7,6 @@ @RequiredArgsConstructor public class ImageUrlVO { - private Integer id; - private String url; + private final Integer id; + private final String url; } diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java index 8f35489d..e2b19fec 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java @@ -17,9 +17,7 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Type; -import org.hibernate.type.SqlTypes; import org.sopt.makers.crew.main.entity.apply.Apply; import org.sopt.makers.crew.main.entity.like.Like; import org.sopt.makers.crew.main.entity.meeting.Meeting; @@ -127,4 +125,6 @@ public void addLike(Like like) { public void addReport(Report report) { this.reports.add(report); } + + public void setUserIdForTest(Integer userId){ this.id = userId;} } diff --git a/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java new file mode 100644 index 00000000..aa7eda44 --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java @@ -0,0 +1,136 @@ +package org.sopt.makers.crew.main.meeting.v2.service; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; + +import java.time.LocalDateTime; +import java.time.Month; +import java.util.ArrayList; +import java.util.List; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.sopt.makers.crew.main.entity.apply.Apply; +import org.sopt.makers.crew.main.entity.apply.ApplyRepository; +import org.sopt.makers.crew.main.entity.apply.enums.EnApplyStatus; +import org.sopt.makers.crew.main.entity.meeting.Meeting; +import org.sopt.makers.crew.main.entity.meeting.MeetingRepository; +import org.sopt.makers.crew.main.entity.meeting.enums.MeetingCategory; +import org.sopt.makers.crew.main.entity.meeting.enums.MeetingJoinablePart; +import org.sopt.makers.crew.main.entity.meeting.vo.ImageUrlVO; +import org.sopt.makers.crew.main.entity.user.User; +import org.sopt.makers.crew.main.entity.user.UserFixture; +import org.sopt.makers.crew.main.entity.user.UserRepository; +import org.sopt.makers.crew.main.entity.user.enums.UserPart; +import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO; +import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingV2GetAllMeetingByOrgUserQueryDto; +import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingByOrgUserDto; + +@ExtendWith(MockitoExtension.class) +public class MeetingV2ServiceTest { + @InjectMocks + private MeetingV2ServiceImpl meetingV2Service; + @Mock + private UserRepository userRepository; + @Mock + private ApplyRepository applyRepository; + @Mock + private MeetingRepository meetingRepository; + + + private List applies; + + private User ownerUser; + + private User applyUser; + + private Meeting meeting; + + @BeforeEach + void init() { + List activityVOS = new ArrayList<>(); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 33)); + + ownerUser = User.builder() + .name("송민규") + .orgId(1) + .activities(activityVOS) + .phone("010-9472-6796") + .build(); + ownerUser.setUserIdForTest(1); + + applyUser = User.builder() + .name("홍길동") + .orgId(2) + .activities(activityVOS) + .phone("010-1234-5678") + .build(); + applyUser.setUserIdForTest(2); + + ImageUrlVO imageUrlVO = new ImageUrlVO(1, "www.~~"); + + meeting = Meeting.builder() + .user(ownerUser) + .userId(ownerUser.getId()) + .title("사람 구해요") + .category(MeetingCategory.STUDY) + .imageURL(List.of(imageUrlVO)) + .startDate(LocalDateTime.of(2024, Month.MARCH, 17, 0, 0)) + .endDate(LocalDateTime.of(2024, Month.MARCH, 20, 23, 59)) + .capacity(10) + .desc("열정 많은 사람 구해요") + .processDesc("이렇게 할거에여") + .mStartDate(LocalDateTime.of(2024, Month.APRIL, 1, 0, 0)) + .mEndDate(LocalDateTime.of(2024, Month.APRIL, 20, 0, 0)) + .leaderDesc("저는 이런 사람이에요.") + .targetDesc("이런 사람이 왔으면 좋겠어요") + .note("유의사항은 이거에요") + .isMentorNeeded(true) + .canJoinOnlyActiveGeneration(true) + .createdGeneration(33) + .targetActiveGeneration(33) + .joinableParts(MeetingJoinablePart.values()) + .appliedInfo(new ArrayList<>()) + .build(); + + + Apply apply = Apply.builder() + .meeting(meeting) + .meetingId(1) + .user(applyUser) + .userId(2) + .content("제 지원동기는요") + .status(EnApplyStatus.APPROVE) + .build(); + + + meeting.addApply(apply); + + applies = new ArrayList<>(); + applies.add(apply); + } + + @Test + void 내모임조회_성공() { + // given + User user = UserFixture.createStaticUser(); + doReturn(user).when(userRepository).findByOrgIdOrThrow(any()); + doReturn(applies).when(applyRepository).findAllByUserIdAndStatus(any(), any()); + + MeetingV2GetAllMeetingByOrgUserQueryDto dto = new MeetingV2GetAllMeetingByOrgUserQueryDto( + applyUser.getOrgId(), 1, 12); + + // when + MeetingV2GetAllMeetingByOrgUserDto myMeetings = meetingV2Service.getAllMeetingByOrgUser(dto); + + // then + Assertions.assertThat(myMeetings.getMeetings().get(0)) + .extracting("isMeetingLeader", "title", "category", "mStartDate", "mEndDate", "isActiveMeeting") + .containsExactly(false, meeting.getTitle(), meeting.getCategory().getValue(), meeting.getMStartDate(), + meeting.getMEndDate(), false); + } +} From a5868f1ba174ef18982f4930ee42c4a484b21e98 Mon Sep 17 00:00:00 2001 From: yeseul106 <20191037@sungshin.ac.kr> Date: Sun, 31 Mar 2024 20:44:04 +0900 Subject: [PATCH 14/16] =?UTF-8?q?[CHORE]=20nest.js=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 + server/package-lock.json | 290 ++++----------------------------------- server/package.json | 4 +- 3 files changed, 35 insertions(+), 265 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..37781e6b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "sopt-crew-backend", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/server/package-lock.json b/server/package-lock.json index 6602267e..49a86bf3 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,12 +1,12 @@ { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "license": "UNLICENSED", "dependencies": { "@aws-sdk/client-s3": "^3.540.0", @@ -32,7 +32,7 @@ "dayjs": "^1.11.10", "json2csv": "^6.0.0-alpha.2", "multer": "^1.4.5-lts.1", - "multer-s3": "^3.0.1", + "multer-s3": "^2.10.0", "passport": "^0.7.0", "passport-jwt": "^4.0.1", "path": "^0.12.7", @@ -1042,84 +1042,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/is-array-buffer": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/is-array-buffer/-/is-array-buffer-3.188.0.tgz", - "integrity": "sha512-n69N4zJZCNd87Rf4NzufPzhactUeM877Y0Tp/F3KiHqGeTnVjYUa4Lv1vLBjqtfjYb2HWT3NKlYn5yzrhaEwiQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.188.0.tgz", - "integrity": "sha512-6odOJn3Gvb4ty8/tUg2PZ9W1XRfXN0buubFZZ8HOuovOVk1PnaxZMYXbo0MGComizFMOBefK5LxBNXHXl/81yQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-endpoint": "3.188.0", - "@aws-sdk/smithy-client": "3.188.0", - "buffer": "5.6.0", - "events": "3.3.0", - "stream-browserify": "3.0.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "@aws-sdk/abort-controller": "^3.0.0", - "@aws-sdk/client-s3": "^3.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/middleware-stack": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-stack/-/middleware-stack-3.188.0.tgz", - "integrity": "sha512-HuqP7hVnnx+aHfE6TutlMgjF0b2Ft08s9CDwyZ7ZhmYodQv/iPba7OGL4qz44oq7mdqlltN9sJkXczSAw0Zbaw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/smithy-client": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/smithy-client/-/smithy-client-3.188.0.tgz", - "integrity": "sha512-heJ1/++zOTU64CxbIRNm3hQgA2muln/HSUz4fDP8T0O8DwJwi9glvJcuoU0yatdjUELMKXMzgzsZSV/+F5EZ6g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-stack": "3.188.0", - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/types": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.188.0.tgz", - "integrity": "sha512-5z4ewjuRFPXYPCV3gaoHDCdjwrpBUs+12uZFBEbGE0S4UV+YrOPN5ehy+rpAGbhrsKYDxbAg9tHLkX4vRDFVgw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.535.0.tgz", @@ -1149,113 +1071,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-endpoint": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.188.0.tgz", - "integrity": "sha512-+jYv63h7O7g355QZhDLFHUGQvFNuaWvBKwdGNDbToxyMFlN9sKb7Y3SORjh95h5AmY6+SQgqHrg12MBC1YjGbg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-serde": "3.188.0", - "@aws-sdk/protocol-http": "3.188.0", - "@aws-sdk/signature-v4": "3.188.0", - "@aws-sdk/types": "3.188.0", - "@aws-sdk/url-parser": "3.188.0", - "@aws-sdk/util-config-provider": "3.188.0", - "@aws-sdk/util-middleware": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/middleware-serde": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-serde/-/middleware-serde-3.188.0.tgz", - "integrity": "sha512-+0dw3ZPDEBv/DqSX9MmLQ2lPvxrO761pJXgDssYNVMY7C+PLB5pU6vKwXbmYAXk/FRwYyRjfKOf2WEvRwen0uw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/protocol-http": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/protocol-http/-/protocol-http-3.188.0.tgz", - "integrity": "sha512-9f5hTzcsQnl64HFUZsD61pT4kmAMgh7nYdPEUQcVmVy0X3rGsbf7CItjxp/tIG/OiJrsM7Rb6hM0gwZO4PHSdQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/querystring-parser": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-parser/-/querystring-parser-3.188.0.tgz", - "integrity": "sha512-QT6yLy0hVxOpCBENytwGj2d6V3NkltebCS+6aGPFzeduYuk+YxE1UkK41vhhhsCpJt5srW1zNDbaUzDRLMRGhQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/signature-v4": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4/-/signature-v4-3.188.0.tgz", - "integrity": "sha512-YRyXFWfbblcOuMm/gcd1MGRFiwxrzaMfnZs8OAqtxLyA4b+fT59C7z2XTAHbjBcCrYEbDR9kF7yPkjn1uxDO8g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/is-array-buffer": "3.188.0", - "@aws-sdk/types": "3.188.0", - "@aws-sdk/util-hex-encoding": "3.188.0", - "@aws-sdk/util-middleware": "3.188.0", - "@aws-sdk/util-uri-escape": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/types": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.188.0.tgz", - "integrity": "sha512-5z4ewjuRFPXYPCV3gaoHDCdjwrpBUs+12uZFBEbGE0S4UV+YrOPN5ehy+rpAGbhrsKYDxbAg9tHLkX4vRDFVgw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/url-parser": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/url-parser/-/url-parser-3.188.0.tgz", - "integrity": "sha512-KdLkmhuFOL7oPhkgVSIMBkaNXxwHqYsHmvZiGOFXT+q28u/Ho85i6ZqgY6FX+/6pfCiF12yDRTBNkqL6SnPwaQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/querystring-parser": "3.188.0", - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/util-middleware": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-middleware/-/util-middleware-3.188.0.tgz", - "integrity": "sha512-Rm2IFzr+b4M/N6aqYndqyCxnxlwtMMDtGU1uRxaOpVapskKpf8H0aF0U/FCN4t70x5HXql0l2Fv4d3CH9CRGig==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/middleware-expect-continue": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.535.0.tgz", @@ -1621,18 +1436,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-config-provider": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-config-provider/-/util-config-provider-3.188.0.tgz", - "integrity": "sha512-LBA7tLbi7v4uvbOJhSnjJrxbcRifKK/1ZVK94JTV2MNSCCyNkFotyEI5UWDl10YKriTIUyf7o5cakpiDZ3O4xg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-endpoints": { "version": "3.540.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.540.0.tgz", @@ -1659,18 +1462,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-hex-encoding": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.188.0.tgz", - "integrity": "sha512-QyWovTtjQ2RYxqVM+STPh65owSqzuXURnfoof778spyX4iQ4z46wOge1YV2ZtwS8w5LWd9eeVvDrLu5POPYOnA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.535.0.tgz", @@ -1682,18 +1473,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-uri-escape": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-uri-escape/-/util-uri-escape-3.188.0.tgz", - "integrity": "sha512-4Y6AYZMT483Tiuq8dxz5WHIiPNdSFPGrl6tRTo2Oi2FcwypwmFhqgEGcqxeXDUJktvaCBxeA08DLr/AemVhPCg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-browser": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.535.0.tgz", @@ -2370,7 +2149,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -2383,7 +2162,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2957,7 +2736,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2986,7 +2765,7 @@ "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "devOptional": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -4318,28 +4097,28 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@types/babel__core": { @@ -5099,7 +4878,7 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, + "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -5129,7 +4908,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -5307,7 +5086,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/argparse": { @@ -6384,7 +6163,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/cross-env": { @@ -6569,7 +6348,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -7116,6 +6895,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.x" @@ -9541,7 +9321,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/makeerror": { @@ -9727,21 +9507,13 @@ } }, "node_modules/multer-s3": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/multer-s3/-/multer-s3-3.0.1.tgz", - "integrity": "sha512-BFwSO80a5EW4GJRBdUuSHblz2jhVSAze33ZbnGpcfEicoT0iRolx4kWR+AJV07THFRCQ78g+kelKFdjkCCaXeQ==", - "license": "MIT", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/multer-s3/-/multer-s3-2.10.0.tgz", + "integrity": "sha512-RZsiqG19C9gE82lB7v8duJ+TMIf70fWYHlIwuNcsanOH1ePBoPXZvboEQxEow9jUkk7WQsuyVA2TgriOuDrVrw==", "dependencies": { - "@aws-sdk/lib-storage": "^3.46.0", "file-type": "^3.3.0", "html-comment-regex": "^1.1.2", "run-parallel": "^1.1.6" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-s3": "^3.0.0" } }, "node_modules/mute-stream": { @@ -10619,6 +10391,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -11199,16 +10972,6 @@ "node": ">= 0.8" } }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -11221,6 +10984,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -11774,7 +11538,7 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, + "devOptional": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -12114,7 +11878,7 @@ "version": "5.4.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12288,7 +12052,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/v8-to-istanbul": { @@ -12637,7 +12401,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6" diff --git a/server/package.json b/server/package.json index c4af9da5..ecf5a1b4 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "description": "", "author": "", "private": true, @@ -47,7 +47,7 @@ "dayjs": "^1.11.10", "json2csv": "^6.0.0-alpha.2", "multer": "^1.4.5-lts.1", - "multer-s3": "^3.0.1", + "multer-s3": "^2.10.0", "passport": "^0.7.0", "passport-jwt": "^4.0.1", "path": "^0.12.7", From 250673a3193d105533b945c10b94ffc9b168c2eb Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 8 Apr 2024 20:11:16 +0900 Subject: [PATCH 15/16] =?UTF-8?q?[DEL]=20schema.sql=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/makers/crew/main/entity/user/UserRepositoryTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java index 95cc574d..1bd8ea9b 100644 --- a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java +++ b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java @@ -6,13 +6,10 @@ import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.jdbc.Sql; @DataJpaTest @ActiveProfiles("test") @AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) -@Sql(scripts = "classpath:schema.sql") public class UserRepositoryTest { @Autowired From 33c3380de5366db60896f2519b0f9f106fb99fef Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 8 Apr 2024 20:13:36 +0900 Subject: [PATCH 16/16] =?UTF-8?q?[CHORE]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=82=A0=EC=A7=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crew/main/meeting/v2/service/MeetingV2ServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java index aa7eda44..3747f920 100644 --- a/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java +++ b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java @@ -85,7 +85,7 @@ void init() { .desc("열정 많은 사람 구해요") .processDesc("이렇게 할거에여") .mStartDate(LocalDateTime.of(2024, Month.APRIL, 1, 0, 0)) - .mEndDate(LocalDateTime.of(2024, Month.APRIL, 20, 0, 0)) + .mEndDate(LocalDateTime.of(2030, Month.APRIL, 20, 0, 0)) .leaderDesc("저는 이런 사람이에요.") .targetDesc("이런 사람이 왔으면 좋겠어요") .note("유의사항은 이거에요") @@ -131,6 +131,6 @@ void init() { Assertions.assertThat(myMeetings.getMeetings().get(0)) .extracting("isMeetingLeader", "title", "category", "mStartDate", "mEndDate", "isActiveMeeting") .containsExactly(false, meeting.getTitle(), meeting.getCategory().getValue(), meeting.getMStartDate(), - meeting.getMEndDate(), false); + meeting.getMEndDate(), true); } }