Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 각 테스트에서 test 프로파일로 테스트를 실행시키도록 수정
Browse files Browse the repository at this point in the history
Libienz committed Dec 19, 2024
1 parent 0d1d484 commit 5d7633a
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/test/java/kr/touroot/global/AcceptanceTest.java
Original file line number Diff line number Diff line change
@@ -4,10 +4,12 @@
import java.lang.annotation.RetentionPolicy;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@Retention(RetentionPolicy.RUNTIME)
@TestPropertySource(properties = {"spring.config.location = classpath:application-test.yml"})
@ActiveProfiles("test")
public @interface AcceptanceTest {
}
2 changes: 2 additions & 0 deletions backend/src/test/java/kr/touroot/global/ServiceTest.java
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -16,5 +17,6 @@
@Import(value = {DatabaseCleaner.class})
@Retention(RetentionPolicy.RUNTIME)
@TestPropertySource(properties = {"spring.config.location = classpath:application-test.yml"})
@ActiveProfiles("test")
public @interface ServiceTest {
}

0 comments on commit 5d7633a

Please sign in to comment.