Skip to content

Commit

Permalink
fix: ObjectUploadContext에 필드값 추가로 인한 테스트 코드들 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kjungw1025 committed Feb 4, 2024
1 parent e3afb55 commit d612bf1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class PetitionServiceTest {

private final Clock clock = ClockUtil.create();
private final Duration writeCooltime = Duration.ofDays(1);
private final ObjectUploadContext uploadContext = new ObjectUploadContext("", "", "", "");
private final ObjectUploadContext uploadContext = new ObjectUploadContext("", "", "", "", "", "");

@Mock
private PetitionStatisticService petitionStatisticService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ class ObjectStorageServiceTest extends AbstractMockServerTest {

private String apiFilePath;

private String apiChatImagePath;

private String apiChatFilePath;



@BeforeEach
public void beforeEach() {
WebClient webClient = WebClient.create();
this.apiPath = "http://localhost:" + mockServer.getPort();
this.uploadContext = new ObjectUploadContext(apiPath, apiImagePath, apiFilePath ,"default");
this.uploadContext = new ObjectUploadContext(apiPath, apiImagePath, apiFilePath ,"default", apiChatImagePath, apiChatFilePath);
this.service = new ObjectStorageService(webClient, uploadContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ public void beforeEach() throws NoSuchMethodException, InvocationTargetException
String osApiPath = properties.get("nhn.os.api-path");
String osApiImagePath = properties.get("nhn.os.api-image-path");
String osApiFilePath = properties.get("nhn.os.api-file-path");
String osApiChatImagePath = properties.get("nhn.os.api-chat-image-path");
String osApiChatFilePath = properties.get("nhn.os.api-chat-file-path");
String authApiPath = properties.get("nhn.auth.api-path");
String tenantId = properties.get("nhn.auth.tenant-id");
String username = properties.get("nhn.auth.username");
String password = properties.get("nhn.auth.password");

ObjectUploadContext uploadContext = new ObjectUploadContext(osApiPath, osApiImagePath, osApiFilePath ,defaultThumbnail);
ObjectUploadContext uploadContext = new ObjectUploadContext(osApiPath, osApiImagePath, osApiFilePath ,defaultThumbnail, osApiChatImagePath, osApiChatFilePath);

this.storageService = new ObjectStorageService(webClient, uploadContext);
this.authService = new NHNAuthService(webClient, authApiPath, tenantId, username, password);
Expand Down

0 comments on commit d612bf1

Please sign in to comment.