Skip to content

Commit

Permalink
CID-2939: Revert test change
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedlajmileanix committed Sep 5, 2024
1 parent e73aca1 commit e20ae21
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() }
}
}

0 comments on commit e20ae21

Please sign in to comment.