Skip to content

Commit 5f358cf

Browse files
committed
Fix test
1 parent 324052c commit 5f358cf

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/kotlin/eu/openanalytics/shinyproxyoperator/MainIntegrationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class MainIntegrationTest : IntegrationTestBase() {
294294
assertEquals("TEST_VALUE", templateSpec.containers[0].env.firstOrNull { it.name == "TEST_VAR" }?.value)
295295
assertNotNull(templateSpec.containers[0].env.firstOrNull { it.name == "PROXY_REALM_ID" })
296296
assertEquals(
297-
sp.metadata.name,
297+
sp.metadata.name + '-' + sp.metadata.namespace,
298298
templateSpec.containers[0].env.firstOrNull { it.name == "PROXY_REALM_ID" }?.value
299299
)
300300

src/test/kotlin/eu/openanalytics/shinyproxyoperator/helpers/IntegrationTestBase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ abstract class IntegrationTestBase {
129129
private suspend fun deleteNamespaces() {
130130
do {
131131
for (managedNamespace in managedNamespaces) {
132-
val ns = stableClient.namespaces().withName(managedNamespace).get() ?: continue
133132
try {
133+
val ns = stableClient.namespaces().withName(managedNamespace).get() ?: continue
134134
stableClient.namespaces().resource(ns).delete()
135135
} catch (_: KubernetesClientException) {
136136
// this namespace is probably all being deleted

src/test/kotlin/eu/openanalytics/shinyproxyoperator/helpers/ShinyProxyTestInstance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class ShinyProxyTestInstance(private val namespace: String,
194194
assertNotNull(templateSpec.containers[0].env.firstOrNull { it.name == "SP_KUBE_POD_UID" })
195195
assertNotNull(templateSpec.containers[0].env.firstOrNull { it.name == "SP_KUBE_POD_NAME" })
196196
assertNotNull(templateSpec.containers[0].env.firstOrNull { it.name == "PROXY_REALM_ID" })
197-
assertEquals(sp.metadata.name, templateSpec.containers[0].env.firstOrNull { it.name == "PROXY_REALM_ID" }?.value)
197+
assertEquals(sp.metadata.name + '-'+ sp.metadata.namespace, templateSpec.containers[0].env.firstOrNull { it.name == "PROXY_REALM_ID" }?.value)
198198

199199
assertEquals(1, templateSpec.containers[0].volumeMounts.size)
200200
assertEquals("config-volume", templateSpec.containers[0].volumeMounts[0].name)

0 commit comments

Comments
 (0)