-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* test: Controller 단위 테스트 컨텍스트 재활용하도록 변경 * test: Repository 단위 테스트 컨텍스트 재활용하도록 변경 * test: 서비스 통합 테스트 컨텍스트 재활용하도록 변경 * chore: MockAuthTestExecutionListener 상속에서 구현으로 변경 * fix: No Scope registered for scope name 'request' 수정 * chore: 테스트 클래스 잘못된 패키지 위치 수정 * fix: CustomWebMvcTest 어노테이션 value 복귀, 다른 브랜치에서 충돌 방지
- Loading branch information
1 parent
6d48b30
commit 3382f8a
Showing
26 changed files
with
232 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
backend/src/test/java/com/festago/acceptance/CucumberSpringConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
package com.festago.acceptance; | ||
|
||
import com.festago.support.DatabaseClearTestExecutionListener; | ||
import io.cucumber.java.Before; | ||
import io.cucumber.spring.CucumberContextConfiguration; | ||
import io.restassured.RestAssured; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; | ||
import org.springframework.boot.test.web.server.LocalServerPort; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.test.context.TestExecutionListeners; | ||
|
||
@Import(CucumberClient.class) | ||
@CucumberContextConfiguration | ||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT) | ||
@TestExecutionListeners(listeners = { | ||
DatabaseClearTestExecutionListener.class}, mergeMode = TestExecutionListeners.MergeMode.MERGE_WITH_DEFAULTS) | ||
public class CucumberSpringConfiguration { | ||
|
||
@LocalServerPort | ||
private int port; | ||
|
||
@Autowired | ||
private DataInitializer dataInitializer; | ||
|
||
@Before | ||
public void before() { | ||
dataInitializer.execute(); | ||
RestAssured.port = port; | ||
} | ||
} |
83 changes: 0 additions & 83 deletions
83
backend/src/test/java/com/festago/acceptance/DataInitializer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.