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

Feature: 회원가입 및 로그인 구현 #16

Merged
merged 9 commits into from
May 10, 2024
16 changes: 16 additions & 0 deletions cakk-api/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,19 @@ slack:
webhook:
is-enable: false
url: url

cloud:
aws:
credentials:
access-key: test
secret-key: test
s3:
bucket: test-bucket
expire-in: 180000
object-key: key
region:
static:
ap-northeast-2
stack:
auto:
false
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.filter.CharacterEncodingFilter;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.navercorp.fixturemonkey.FixtureMonkey;
import com.navercorp.fixturemonkey.api.introspector.BuilderArbitraryIntrospector;
Expand All @@ -18,7 +20,7 @@

@AutoConfigureMockMvc
@ActiveProfiles("test")
@SpringBootTest
@SpringBootTest(properties = "spring.profiles.active: test")
public abstract class ControllerTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Controller Test에서는 MockMvc로 테스트하고 통합테스트는 따로 Test Container로 설정된 DB까지 접근될 수 있게 작성하면 되는걸로 이해하면 되나요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

어.. 그런건 아니고, 의식의 흐름이었습니다 ㅋㅋ 수정하고 리뷰 요청 다시 보내겠습니다.


@Autowired
Expand Down Expand Up @@ -52,4 +54,8 @@ protected final FixtureMonkey getBuilderMonkey() {
.objectIntrospector(BuilderArbitraryIntrospector.INSTANCE)
.build();
}

protected String toJson(Object request) throws JsonProcessingException {
return objectMapper.writeValueAsString(request);
}
}
41 changes: 32 additions & 9 deletions cakk-api/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#spring:
# datasource:
# driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
# url: jdbc:tc:mysql:8.0:///cakk
#
# jpa:
# hibernate:
# ddl-auto: create
# show-sql: true
spring:
datasource:
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
url: jdbc:tc:mysql:8.0:///cakk

jpa:
hibernate:
ddl-auto: create
show-sql: true
flyway:
enabled: false

oauth:
kakao:
Expand All @@ -26,8 +28,29 @@ storage:
data-source-properties:
rewriteBatchedStatements: true

slack:
webhook:
is-enable: false
url: url

jwt:
secret: testestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestestest
expiration:
access-token: 1814400000
refresh-token: 2592000000

cloud:
aws:
credentials:
access-key: test
secret-key: test
s3:
bucket: test-bucket
expire-in: 180000
object-key: key
region:
static:
ap-northeast-2
stack:
auto:
false
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class S3Service {
public S3Service(
@Value("${cloud.aws.s3.bucket}") String bucket,
@Value("${cloud.aws.s3.expire-in}") String expiredIn,
@Value("${cloud.aws.s3.objectKey}") String objectKey,
@Value("${cloud.aws.s3.object-key}") String objectKey,
AmazonS3 amazonS3
) {
this.bucket = bucket;
Expand Down