Skip to content

Commit 05b97c2

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

480480
@Test
481-
fun `CodeModernizer cannot upload payload due to client-side issue`() = runTest {
481+
fun `CodeModernizer cannot upload payload due to unknown 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 Exception("mock client-side exception") }.whenever(clientAdaptorSpy).uploadArtifactToS3(any(), any(), any(), any(), any())
485+
doAnswer { throw IOException("mock exception") }.whenever(clientAdaptorSpy).uploadArtifactToS3(any(), any(), any(), any(), any())
486486
val result = testSessionSpy.createModernizationJob(MavenCopyCommandsResult.Success(File("./mock/path/")))
487487
assertEquals(CodeModernizerStartJobResult.ZipUploadFailed(UploadFailureReason.OTHER("mock exception")), result)
488488
verify(testSessionStateSpy, times(1)).putJobHistory(any(), eq(TransformationStatus.FAILED), any(), any())

0 commit comments

Comments
 (0)