Skip to content
Snippets Groups Projects
Commit 645a24f5 authored by Sören Henning's avatar Sören Henning
Browse files

Refactor excpetion test

parent f816dc92
No related branches found
No related tags found
1 merge request!213Upgrade Quarkus
Pipeline #5630 failed
This commit is part of merge request !213. Comments created here will be created in the context of that merge request.
...@@ -13,6 +13,7 @@ import junit.framework.Assert.assertEquals ...@@ -13,6 +13,7 @@ import junit.framework.Assert.assertEquals
import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import theodolite.k8s.CustomResourceWrapper import theodolite.k8s.CustomResourceWrapper
import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile
import theodolite.util.DeploymentFailedException import theodolite.util.DeploymentFailedException
...@@ -211,16 +212,12 @@ class ConfigMapResourceSetTest { ...@@ -211,16 +212,12 @@ class ConfigMapResourceSetTest {
} }
@Test() @Test
fun testConfigMapNotExist() { fun testConfigMapNotExist() {
val resourceSet = ConfigMapResourceSet() val resourceSet = ConfigMapResourceSet()
resourceSet.name = "test-configmap1" resourceSet.name = "test-configmap1"
lateinit var ex: Exception assertThrows<DeploymentFailedException> {
try {
resourceSet.getResourceSet(server.client) resourceSet.getResourceSet(server.client)
} catch (e: Exception) {
ex = e
} }
assertTrue(ex is DeploymentFailedException)
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment