unit test need to reflect on empty envVars if no configmap or secret are defined

This commit is contained in:
Felix Kunde
2022-04-14 11:40:25 +02:00
parent 78a2e92626
commit 50dde2a21b
+2
View File
@@ -250,6 +250,7 @@ func TestPodEnvironmentConfigMapVariables(t *testing.T) {
}{ }{
{ {
subTest: "no PodEnvironmentConfigMap", subTest: "no PodEnvironmentConfigMap",
envVars: []v1.EnvVar{},
}, },
{ {
subTest: "missing PodEnvironmentConfigMap", subTest: "missing PodEnvironmentConfigMap",
@@ -324,6 +325,7 @@ func TestPodEnvironmentSecretVariables(t *testing.T) {
}{ }{
{ {
subTest: "No PodEnvironmentSecret configured", subTest: "No PodEnvironmentSecret configured",
envVars: []v1.EnvVar{},
}, },
{ {
subTest: "Secret referenced by PodEnvironmentSecret does not exist", subTest: "Secret referenced by PodEnvironmentSecret does not exist",