@@ -295,6 +295,8 @@ var _ = Describe("WMS Controller", func() {
295295 capabilitiesGeneratorContainer , err := getInitContainer ("capabilities-generator" , deployment )
296296 Expect (err ).NotTo (HaveOccurred ())
297297 Expect (capabilitiesGeneratorContainer .Image ).Should (Equal (reconcilerImages .CapabilitiesGeneratorImage ))
298+ Expect (capabilitiesGeneratorContainer .ImagePullPolicy ).Should (Equal (v1 .PullIfNotPresent ))
299+
298300 volumeMounts = []v1.VolumeMount {
299301 {Name : "data" , MountPath : "/var/www" },
300302 {Name : mapserver .ConfigMapCapabilitiesGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
@@ -305,6 +307,53 @@ var _ = Describe("WMS Controller", func() {
305307 }
306308 Expect (capabilitiesGeneratorContainer .Env ).Should (Equal (env ))
307309
310+ featureinfoGeneratorContainer , err := getInitContainer ("featureinfo-generator" , deployment )
311+ Expect (err ).NotTo (HaveOccurred ())
312+ Expect (featureinfoGeneratorContainer .Image ).Should (Equal (reconcilerImages .FeatureinfoGeneratorImage ))
313+ Expect (featureinfoGeneratorContainer .ImagePullPolicy ).Should (Equal (v1 .PullIfNotPresent ))
314+ Expect (featureinfoGeneratorContainer .Command ).Should (Equal ([]string {"featureinfo-generator" }))
315+ volumeMounts = []v1.VolumeMount {
316+ {Name : "base" , MountPath : "/srv/data" , ReadOnly : false },
317+ {Name : mapserver .ConfigMapFeatureinfoGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
318+ }
319+ Expect (featureinfoGeneratorContainer .VolumeMounts ).Should (Equal (volumeMounts ))
320+ Expect (len (featureinfoGeneratorContainer .Args )).Should (BeNumerically ("==" , 6 ))
321+
322+ legendGeneratorContainer , err := getInitContainer ("legend-generator" , deployment )
323+ Expect (err ).NotTo (HaveOccurred ())
324+ Expect (legendGeneratorContainer .Image ).Should (Equal (reconcilerImages .MapserverImage ))
325+ Expect (legendGeneratorContainer .ImagePullPolicy ).Should (Equal (v1 .PullIfNotPresent ))
326+ Expect (len (legendGeneratorContainer .Command )).Should (BeNumerically ("==" , 3 ))
327+ volumeMounts = []v1.VolumeMount {
328+ {Name : "base" , MountPath : "/srv/data" , ReadOnly : false },
329+ {Name : "data" , MountPath : "/var/www" , ReadOnly : false },
330+ // TODO: de volgende volAmount is bedoeld voor CR met mapfile. Bouw daarvoor een aparte test voor
331+ //{Name: mapserver.ConfigMapVolumeName, MountPath: "/srv/mapserver/config/default_mapserver.conf"},
332+ {Name : mapserver .ConfigMapLegendGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
333+ }
334+ Expect (legendGeneratorContainer .VolumeMounts ).Should (Equal (volumeMounts ))
335+
336+ env = []v1.EnvVar {
337+ {Name : "MS_MAPFILE" , Value : "service.map" , ValueFrom : nil },
338+
339+ // TODO: de volgende volAmount is bedoeld voor CR met mapfile. Bouw daarvoor een aparte test voor
340+ //{Name: "MAPSERVER_CONFIG_FILE", Value: "/srv/mapserver/config/default_mapserver.conf"},
341+ //{Name: "MS_MAPFILE", Value: "/srv/data/config/mapfile/service.map"},
342+ }
343+ Expect (legendGeneratorContainer .Env ).Should (Equal (env ))
344+
345+ legendFixerContainer , err := getInitContainer ("legend-fixer" , deployment )
346+ Expect (err ).NotTo (HaveOccurred ())
347+ Expect (legendFixerContainer .Image ).Should (Equal (reconcilerImages .MultitoolImage ))
348+ Expect (legendFixerContainer .ImagePullPolicy ).Should (Equal (v1 .PullIfNotPresent ))
349+ Expect (len (legendFixerContainer .Command )).Should (BeNumerically ("==" , 2 ))
350+
351+ volumeMounts = []v1.VolumeMount {
352+ {Name : "data" , MountPath : "/var/www" , ReadOnly : false },
353+ {Name : mapserver .ConfigMapLegendGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
354+ }
355+ Expect (legendFixerContainer .VolumeMounts ).Should (Equal (volumeMounts ))
356+
308357 /**
309358 Volumes tests
310359 */
0 commit comments