Skip to content

Commit

Permalink
merge: 테스트 환경설정 완료
Browse files Browse the repository at this point in the history
`dev/test/setup` -> `main`
테스트 환경설정을 완료하여 `main`브랜치로 병합합니다.
  • Loading branch information
juwon-code authored Sep 27, 2024
2 parents 8e7ac21 + 42a41d9 commit 7cb4494
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

testImplementation 'com.h2database:h2:2.3.232'
testImplementation 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import java.util.List;

@Service
public interface JobPostService {

static JobPostDTO register(JobPostDTO jobPostDTO) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public UserDTO read(String email) { /**단순 조회 로직*/
}

public UserDTO register(UserDTO userDTO) {

return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static org.junit.jupiter.api.Assertions.*;

@SpringBootTest
@ActiveProfiles("dev")
@Log4j2
class UserRepositoryTest {
@Autowired
Expand Down
11 changes: 11 additions & 0 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# this is only used in the test environment!

# H2 database connection settings
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=MySQL
spring.datasource.username=sa
spring.datasource.password=

# JPA settings
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true

0 comments on commit 7cb4494

Please sign in to comment.