From 8f51dfee677fe93161d88321d95ae81eda8d65c6 Mon Sep 17 00:00:00 2001 From: Junho-06 Date: Thu, 3 Aug 2023 12:04:23 +0900 Subject: [PATCH 1/3] update ci file --- .github/workflows/prod-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/prod-ci.yml b/.github/workflows/prod-ci.yml index 3fcd5a8..4acd8cc 100644 --- a/.github/workflows/prod-ci.yml +++ b/.github/workflows/prod-ci.yml @@ -63,6 +63,9 @@ jobs: touch scripts/prod-deploy.sh echo "aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin $ECR_REGISTRY" >> scripts/prod-deploy.sh echo "docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> scripts/prod-deploy.sh + echo "docker image prune -f" >> scripts/prod-deploy.sh + echo "docker stop official-prod-client-server" >> scripts/prod-deploy.sh + echo "docker rm official-prod-client-server" >> scripts/prod-deploy.sh echo "docker run -p 8080:8080 -d --restart always --name official-prod-client-server $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> scripts/prod-deploy.sh - name: upload to s3 From a39599353e5ccda1de1a635e592196e77fb026a5 Mon Sep 17 00:00:00 2001 From: jangwooooo Date: Wed, 9 Aug 2023 13:46:18 +0900 Subject: [PATCH 2/3] Fix parameter on findPostList --- .../officialgsmclientserver/service/BoardServiceTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/example/officialgsmclientserver/service/BoardServiceTest.java b/src/test/java/com/example/officialgsmclientserver/service/BoardServiceTest.java index 054f05a..259627d 100644 --- a/src/test/java/com/example/officialgsmclientserver/service/BoardServiceTest.java +++ b/src/test/java/com/example/officialgsmclientserver/service/BoardServiceTest.java @@ -69,7 +69,7 @@ void setUp() { postRepository.save(post); File file = File.builder() - .fileUrl("http://bucket.ottokeng.site/743d7afd-690c-404a-b7fb-b6fe97598504.jpg") + .fileUrl("file_url") .fileName("file_name") .fileExtension(FileExtension.JPG) .post(post) @@ -85,7 +85,7 @@ void setUp() { @Test @DisplayName("게시물 목록 조회") void findPostList() { - PostListResponse response = boardService.findPostList(0, Category.EVENT_GALLERY); + PostListResponse response = boardService.findPostList(1, Category.EVENT_GALLERY, 5); assertThat(response.getPostList().get(0).getPostTitle()).isEqualTo("title"); assertThat(response.getPostList().get(0).getThumbnailUrl()).isEqualTo(fileRepository.findAll().get(0).getFileUrl()); @@ -97,12 +97,11 @@ void findPostList() { @DisplayName("게시물 상세 조회") void findPost() { Post post = postRepository.findAll().get(0); - System.out.println(post.getPostSeq()); PostDetailResponse response = boardService.findPost(post.getPostSeq()); assertThat(response.getPostTitle()).isEqualTo("title"); assertThat(response.getPostWriter()).isEqualTo("최장우"); - assertThat(response.getFileInfo().get(0).getFileUrl()).isEqualTo("http://bucket.ottokeng.site/743d7afd-690c-404a-b7fb-b6fe97598504.jpg"); + assertThat(response.getFileInfo().get(0).getFileUrl()).isEqualTo("file_url"); assertThat(response.getFileInfo().get(0).getFileExtension()).isEqualTo(FileExtension.JPG); } } From f56b33807be06c1e0344c042933cccaafa7b3b3d Mon Sep 17 00:00:00 2001 From: jangwooooo Date: Fri, 18 Aug 2023 14:12:20 +0900 Subject: [PATCH 3/3] Add Master Permission to Role --- .../example/officialgsmclientserver/domain/user/entity/Role.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/example/officialgsmclientserver/domain/user/entity/Role.java b/src/main/java/com/example/officialgsmclientserver/domain/user/entity/Role.java index 866a719..f7cd215 100644 --- a/src/main/java/com/example/officialgsmclientserver/domain/user/entity/Role.java +++ b/src/main/java/com/example/officialgsmclientserver/domain/user/entity/Role.java @@ -6,6 +6,7 @@ @Getter @AllArgsConstructor public enum Role { + MASTER("MASTER"), ADMIN("ADMIN"), UNAPPROVED("UNAPPROVED");