Skip to content
Permalink
Browse files

Disable relevant test

  • Loading branch information...
Yan Ivnitskiy
Yan Ivnitskiy committed May 28, 2019
1 parent 0baee8f commit d358944f8606bf8746e77168d160fb5b4fb1d565
Showing with 4 additions and 3 deletions.
  1. +4 −3 misk-crypto/src/test/kotlin/misk/crypto/CryptoModuleTest.kt
@@ -20,6 +20,7 @@ import misk.testing.MiskTest
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatCode
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.Ignore
import org.junit.Test
import java.io.ByteArrayOutputStream
import java.security.GeneralSecurityException
@@ -97,20 +98,20 @@ class CryptoModuleTest {
.isInstanceOf(KeyNotFoundException::class.java)
}

@Test
@Ignore @Test // Currently disabled since the env check is as well
fun testRaisesInWrongEnv() {

val plainKey = Key("name", KeyType.AEAD, MiskConfig.RealSecret(""))
val kr = KeyReader()
val client = FakeKmsClient()

assertThatThrownBy {
kr.env = Environment.STAGING
// kr.env = Environment.STAGING
kr.readKey(plainKey, null, client)
}.isInstanceOf(GeneralSecurityException::class.java)

assertThatThrownBy {
kr.env = Environment.PRODUCTION
// kr.env = Environment.PRODUCTION
kr.readKey(plainKey, null, client)
}.isInstanceOf(GeneralSecurityException::class.java)
}

0 comments on commit d358944

Please sign in to comment.
You can’t perform that action at this time.