Skip to content

Commit

Permalink
Fix(be): 테스트 프로파일 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
devbattery committed Feb 5, 2025
1 parent 5c13a1f commit 61d6c7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/be-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
# 생성 후 파일 확인 명령어 추가
ls -l ${{ env.TEST_RESOURCE_PATH }}/application.yml
stat ${{ env.TEST_RESOURCE_PATH }}/application.yml
- name: Validate YAML syntax
run: |
python3 -c 'import yaml, sys; yaml.safe_load(sys.stdin)' < ${{ env.TEST_RESOURCE_PATH }}/application.yml
- name: 어플리케이션을 빌드한다
run: |
chmod +x gradlew
Expand Down
2 changes: 1 addition & 1 deletion be/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ out/

# Exclude sensitive configuration file
src/main/resources/application.yml
src/test/resources/application.yml
src/main/resources/application-test.yml
3 changes: 2 additions & 1 deletion be/src/test/java/movlit/be/acceptance/AcceptanceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.RestDocumentationExtension;
import org.springframework.restdocs.operation.preprocess.Preprocessors;
import org.springframework.restdocs.restassured.RestAssuredRestDocumentation;
import org.springframework.test.context.ActiveProfiles;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.MySQLContainer;
import org.testcontainers.utility.DockerImageName;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@ExtendWith(RestDocumentationExtension.class)
@ActiveProfiles("test")
public abstract class AcceptanceTest {

public static final DockerImageName MYSQL_IMAGE = DockerImageName.parse("mysql:8.0");
Expand Down

0 comments on commit 61d6c7f

Please sign in to comment.