From e20ae214f8357d07f2a6a0d3b610f83147a57a6b Mon Sep 17 00:00:00 2001 From: mohamedlajmileanix Date: Thu, 5 Sep 2024 09:19:55 +0200 Subject: [PATCH] CID-2939: Revert test change --- .../githubagent/services/GitHubAuthenticationServiceTest.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/test/kotlin/net/leanix/githubagent/services/GitHubAuthenticationServiceTest.kt b/src/test/kotlin/net/leanix/githubagent/services/GitHubAuthenticationServiceTest.kt index 639055a..8543776 100644 --- a/src/test/kotlin/net/leanix/githubagent/services/GitHubAuthenticationServiceTest.kt +++ b/src/test/kotlin/net/leanix/githubagent/services/GitHubAuthenticationServiceTest.kt @@ -4,7 +4,6 @@ import io.mockk.every import io.mockk.mockk import net.leanix.githubagent.client.GitHubClient import net.leanix.githubagent.config.GitHubEnterpriseProperties -import net.leanix.githubagent.exceptions.GitHubAppInsufficientPermissionsException import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertThrows import org.junit.jupiter.api.Test @@ -44,10 +43,7 @@ class GitHubAuthenticationServiceTest { every { cachingService.get(any()) } returns "dummy-value" every { githubEnterpriseProperties.pemFile } returns "invalid-private-key.pem" every { resourceLoader.getResource(any()) } returns ClassPathResource("invalid-private-key.pem") - every { gitHubEnterpriseService.verifyJwt(any()) } throws GitHubAppInsufficientPermissionsException("") - assertThrows(GitHubAppInsufficientPermissionsException::class.java) { - githubAuthenticationService.generateAndCacheJwtToken() - } + assertThrows(IllegalArgumentException::class.java) { githubAuthenticationService.generateAndCacheJwtToken() } } }