Skip to content

Commit 7d5c6cf

Browse files
author
David Hasani
committed
update test
1 parent 05b97c2 commit 7d5c6cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/amazonq/codetransform/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codemodernizer/CodeWhispererCodeModernizerSessionTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,13 +478,13 @@ class CodeWhispererCodeModernizerSessionTest : CodeWhispererCodeModernizerTestBa
478478
}
479479

480480
@Test
481-
fun `CodeModernizer cannot upload payload due to unknown issue`() = runTest {
481+
fun `CodeModernizer cannot upload payload due to unknown client-side issue`() = runTest {
482482
doReturn(ZipCreationResult.Succeeded(File("./tst-resources/codemodernizer/test.txt")))
483483
.whenever(testSessionContextSpy).createZipWithModuleFiles(any())
484484
doReturn(exampleCreateUploadUrlResponse).whenever(clientAdaptorSpy).createGumbyUploadUrl(any())
485-
doAnswer { throw IOException("mock exception") }.whenever(clientAdaptorSpy).uploadArtifactToS3(any(), any(), any(), any(), any())
485+
doAnswer { throw Exception("mock client-side exception") }.whenever(clientAdaptorSpy).uploadArtifactToS3(any(), any(), any(), any(), any())
486486
val result = testSessionSpy.createModernizationJob(MavenCopyCommandsResult.Success(File("./mock/path/")))
487-
assertEquals(CodeModernizerStartJobResult.ZipUploadFailed(UploadFailureReason.OTHER("mock exception")), result)
487+
assertEquals(CodeModernizerStartJobResult.ZipUploadFailed(UploadFailureReason.OTHER("mock client-side exception")), result)
488488
verify(testSessionStateSpy, times(1)).putJobHistory(any(), eq(TransformationStatus.FAILED), any(), any())
489489
assertEquals(testSessionStateSpy.currentJobStatus, TransformationStatus.FAILED)
490490
}

0 commit comments

Comments
 (0)