Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: testContainer #82

Merged
merged 5 commits into from
Oct 9, 2023
Merged

add: testContainer #82

merged 5 commits into from
Oct 9, 2023

Conversation

JangHyeonJun2
Copy link
Contributor

@JangHyeonJun2 JangHyeonJun2 commented Oct 6, 2023

해결하려는 문제가 무엇인가요?

  • test code CI/CD 실패

어떻게 해결했나요?

  • 테스트콘테이너 도입
  • 급하게 만든거라 추상화 및 리팩토링 진행해야합니다.. ( 제가 토요일 컴퓨터를 못해서 .ㅠㅠㅠ )
  • 토요일까지는 merge 하지는 않겠습니다. 제가 따로 와서 merge 할게요.
  • 해당 브랜치 체크아웃해서 테스트코드 돌려보시면 도커 붙고 스키마 만들고 테스트 진행하는 거 알 수 있습니다.
  • 기훈님 테스트코드로 샘플 코드 만들어봤고, DB 붙는 코드를 base코드로 만들어 모든 테스트코드에 상속할 수 있도록 수정하도록 할게요.

  • 테스트컨테이너 클래스 분리
  • 테스트컨테이너 어노테이션 생성 @KATJTestContainerE2E
    • SpringBootTest는 해당 어노테이션만 붙이면 정상 동작
    • @retention : 컴파일러가 어노테이션을 다루는 방법을 기술 (적용)
    • @target : 어노테이션 적용할 위치 선택 (적용)
    • @documented : 해당 어노테이션을 Javadoc에 포함시킴 (적용x)
    • @inherited : 어노테이션의 상속을 가능하게 함 (적용x)
    • @repeatable : Java8 부터 지원하며, 연속적으로 어노테이션을 선언할 수 있게 함 (적용x)

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test Results

9 tests   9 ✔️  2s ⏱️
2 suites  0 💤
2 files    0

Results for commit a8bc446.

♻️ This comment has been updated with latest results.

@JangHyeonJun2 JangHyeonJun2 temporarily deployed to dev October 6, 2023 19:42 — with GitHub Actions Inactive
@TonyKim9401
Copy link
Contributor

📝 테스트 커버리지 리포트입니다

File Coverage [100%] 🍏
FavoriteService.kt 100% 🍏
Total Project Coverage 68.71% 🍏

Copy link
Contributor

@TonyKim9401 TonyKim9401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

컨테이너 추가 감사합니다 :)

@JangHyeonJun2
Copy link
Contributor Author

test

@@ -26,6 +26,7 @@ out/
!**/src/main/**/out/
!**/src/test/**/out/
application.yml
application-test.yml
application-dev.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최선인가요?

@@ -20,6 +20,8 @@ repositories {
mavenCentral()
}

extra["testcontainersVersion"] = "1.19.1"

dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트

@JangHyeonJun2
Copy link
Contributor Author

test

# Conflicts:
#	build.gradle.kts
#	src/main/kotlin/com/hh2/katj/favorite/repository/FavoriteRepository.kt
#	src/main/kotlin/com/hh2/katj/favorite/service/FavoriteService.kt
@JangHyeonJun2 JangHyeonJun2 temporarily deployed to dev October 9, 2023 16:11 — with GitHub Actions Inactive
@TonyKim9401
Copy link
Contributor

📝 테스트 커버리지 리포트입니다

There is no coverage information present for the Files changed

Total Project Coverage 54.43% 🍏

@JangHyeonJun2
Copy link
Contributor Author

test

1 similar comment
@JangHyeonJun2
Copy link
Contributor Author

test

@JangHyeonJun2
Copy link
Contributor Author

test

ㄹㅇㄹㅇㄹㅇ

@JangHyeonJun2
Copy link
Contributor Author

test

@@ -20,6 +20,8 @@ repositories {
mavenCentral()
}

extra["testcontainersVersion"] = "1.19.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최선인가요?

@JangHyeonJun2 JangHyeonJun2 merged commit 140281d into dev Oct 9, 2023
3 checks passed
@JangHyeonJun2 JangHyeonJun2 temporarily deployed to dev October 9, 2023 16:58 — with GitHub Actions Inactive
@JangHyeonJun2 JangHyeonJun2 temporarily deployed to dev October 9, 2023 17:00 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants