@@ -264,7 +264,7 @@ var _ = Describe("WMS Controller", func() {
264264 Expect (containerMapserver .StartupProbe .PeriodSeconds ).Should (Equal (int32 (10 )))
265265 Expect (containerMapserver .StartupProbe .TimeoutSeconds ).Should (Equal (int32 (10 )))
266266
267- containerOgcWebserviceProxy := deployment .Spec .Template .Spec .Containers [1 ]
267+ containerOgcWebserviceProxy := deployment .Spec .Template .Spec .Containers [2 ]
268268 Expect (containerOgcWebserviceProxy .Name ).Should (Equal ("ogc-webservice-proxy" ))
269269 ogcWebserviceProxyCommands := []string {"/ogc-webservice-proxy" , "-h=http://127.0.0.1/" , "-t=wms" , "-s=/input/service-config.yaml" , "-v" , "-d=15" }
270270 Expect (containerOgcWebserviceProxy .Command ).Should (Equal (ogcWebserviceProxyCommands ))
@@ -351,6 +351,7 @@ var _ = Describe("WMS Controller", func() {
351351 Expect (legendGeneratorContainer .VolumeMounts ).Should (Equal (volumeMounts ))
352352
353353 env = []corev1.EnvVar {
354+ {Name : "MAPSERVER_CONFIG_FILE" , Value : "/srv/mapserver/config/default_mapserver.conf" , ValueFrom : nil },
354355 {Name : "MS_MAPFILE" , Value : "/srv/data/config/mapfile/service.map" , ValueFrom : nil },
355356 }
356357 Expect (legendGeneratorContainer .Env ).Should (Equal (env ))
@@ -526,7 +527,7 @@ var _ = Describe("WMS Controller", func() {
526527 err = k8sClient .Get (ctx , types.NamespacedName {Namespace : namespace , Name : getBareDeployment (wms ).GetName ()}, deployment )
527528 Expect (err ).NotTo (HaveOccurred ())
528529
529- containerOgcWebserviceProxy := deployment .Spec .Template .Spec .Containers [1 ]
530+ containerOgcWebserviceProxy := deployment .Spec .Template .Spec .Containers [2 ]
530531 Expect (containerOgcWebserviceProxy .Name ).Should (Equal ("ogc-webservice-proxy" ))
531532 ogcWebserviceProxyCommands := []string {"/ogc-webservice-proxy" , "-h=http://127.0.0.1/" , "-t=wms" , "-s=/input/service-config.yaml" , "-d=15" }
532533 Expect (containerOgcWebserviceProxy .Command ).Should (Equal (ogcWebserviceProxyCommands ))
@@ -884,7 +885,7 @@ var _ = Describe("WMS Controller", func() {
884885 Expect (len (ingressRoute .Spec .Routes )).To (Equal (2 ))
885886 Expect (ingressRoute .Spec .Routes [0 ]).To (Equal (traefikiov1alpha1.Route {
886887 Kind : "Rule" ,
887- Match : "Host(`localhost`) && Path (`/owner/dataset/wms/1.0.0/legend`)" ,
888+ Match : "Host(`localhost`) && PathPrefix (`/owner/dataset/wms/1.0.0/legend`)" ,
888889 Middlewares : []traefikiov1alpha1.MiddlewareRef {{Name : wms .GetName () + "-wms-mapserver-headers" }},
889890 Services : []traefikiov1alpha1.Service {{
890891 LoadBalancerSpec : traefikiov1alpha1.LoadBalancerSpec {
@@ -920,7 +921,7 @@ var _ = Describe("WMS Controller", func() {
920921
921922 sampleWms , err := getUniqueWMSSample (counter )
922923 counter ++
923- sampleWms .Spec .Service .Mapfile = & pdoknlv3.Mapfile {ConfigMapKeyRef : corev1.ConfigMapKeySelector {Key : "mapfile.map" }}
924+ sampleWms .Spec .Service .Mapfile = & pdoknlv3.Mapfile {ConfigMapKeyRef : corev1.ConfigMapKeySelector {Key : "mapfile.map" , LocalObjectReference : corev1. LocalObjectReference { Name : "custom-mapfile" } }}
924925 typeNamespacedNameWms .Name = sampleWms .Name
925926
926927 Expect (err ).NotTo (HaveOccurred ())
@@ -939,14 +940,15 @@ var _ = Describe("WMS Controller", func() {
939940 volumeMounts := []corev1.VolumeMount {
940941 {Name : "base" , MountPath : "/srv/data" , ReadOnly : false },
941942 {Name : "data" , MountPath : "/var/www" , ReadOnly : false },
942- {Name : mapserver .ConfigMapLegendGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
943943 {Name : "mapfile" , MountPath : "/srv/data/config/mapfile" },
944+ {Name : mapserver .ConfigMapLegendGeneratorVolumeName , MountPath : "/input" , ReadOnly : true },
944945 }
945946 legendGeneratorContainer , _ := getInitContainer ("legend-generator" , deployment )
946947
947948 Expect (legendGeneratorContainer .VolumeMounts ).Should (Equal (volumeMounts ))
948949
949950 env := []corev1.EnvVar {
951+ {Name : "MAPSERVER_CONFIG_FILE" , Value : "/srv/mapserver/config/default_mapserver.conf" , ValueFrom : nil },
950952 {Name : "MS_MAPFILE" , Value : "/srv/data/config/mapfile/mapfile.map" , ValueFrom : nil },
951953 }
952954 Expect (legendGeneratorContainer .Env ).Should (Equal (env ))
0 commit comments