Skip to content

Commit

Permalink
[BE] fix: redis 의존성 제거 (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
donghoony authored Nov 29, 2024
1 parent 1c99dd8 commit c07afbb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
1 change: 0 additions & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies {
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
Expand Down
19 changes: 1 addition & 18 deletions backend/src/test/java/reviewme/api/ApiTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package reviewme.api;

import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.BDDMockito.given;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyHeaders;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.modifyUris;
Expand All @@ -17,11 +15,8 @@
import org.apache.http.HttpHeaders;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.http.MediaType;
import org.springframework.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.RestDocumentationExtension;
Expand All @@ -34,8 +29,8 @@
import reviewme.highlight.controller.HighlightController;
import reviewme.highlight.service.HighlightService;
import reviewme.review.controller.ReviewController;
import reviewme.review.service.ReviewGatheredLookupService;
import reviewme.review.service.ReviewDetailLookupService;
import reviewme.review.service.ReviewGatheredLookupService;
import reviewme.review.service.ReviewListLookupService;
import reviewme.review.service.ReviewRegisterService;
import reviewme.review.service.ReviewSummaryService;
Expand Down Expand Up @@ -78,12 +73,6 @@ public abstract class ApiTest {
@MockBean
protected ReviewGroupLookupService reviewGroupLookupService;

@MockBean
protected RedisTemplate<String, Long> redisTemplate;

@Mock
protected ValueOperations<String, Long> valueOperations;

@MockBean
protected ReviewSummaryService reviewSummaryService;

Expand Down Expand Up @@ -111,12 +100,6 @@ public abstract class ApiTest {
}
};

@BeforeEach
void setUpRedisConfig() {
given(redisTemplate.opsForValue()).willReturn(valueOperations);
given(valueOperations.increment(anyString())).willReturn(1L);
}

@BeforeEach
void setUpRestDocs(WebApplicationContext context, RestDocumentationContextProvider provider) {
UriModifyingOperationPreprocessor uriModifier = modifyUris()
Expand Down

0 comments on commit c07afbb

Please sign in to comment.