Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jangwooooo committed Dec 4, 2023
2 parents 888a575 + 775ca4a commit 806b380
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/prod-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@Getter
@AllArgsConstructor
public enum Role {
MASTER("MASTER"),
ADMIN("ADMIN"),
UNAPPROVED("UNAPPROVED");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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());
Expand All @@ -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);
}
}

0 comments on commit 806b380

Please sign in to comment.