@@ -127,108 +127,108 @@ var _ = Describe("WMS Webhook", func() {
127127 // obj.Spec.Service.Layer.Abstract = nil
128128 // _, err := validator.ValidateCreate(ctx, obj)
129129 // Expect(err).To(HaveOccurred())
130- //})
130+ // })
131131 //
132- //It("Should deny creation if layer is visible and has no value for required field keywords", func() {
132+ // It("Should deny creation if layer is visible and has no value for required field keywords", func() {
133133 // obj.Spec.Service.Layer.Keywords = nil
134134 // _, err := validator.ValidateCreate(ctx, obj)
135135 // Expect(err).To(HaveOccurred())
136- //})
136+ // })
137137 //
138- //It("Should deny creation if there is a visible layer without a style title", func() {
138+ // It("Should deny creation if there is a visible layer without a style title", func() {
139139 // nestedLayers1 := obj.Spec.Service.Layer.Layers
140140 // nestedLayers2 := nestedLayers1[0].Layers
141141 // nestedLayers2[0].Styles[0].Title = nil
142142 // _, err := validator.ValidateCreate(ctx, obj)
143143 // Expect(err).To(HaveOccurred())
144- //})
144+ // })
145145 //
146- //It("Should deny creation if layer has parent layer with same style name as child layer", func() {
146+ // It("Should deny creation if layer has parent layer with same style name as child layer", func() {
147147 // nestedLayers1 := obj.Spec.Service.Layer.Layers
148148 // nestedLayers2 := nestedLayers1[0].Layers
149149 // nestedLayers1[0].Styles = []pdoknlv3.Style{{Name: nestedLayers2[0].Styles[0].Name}}
150150 // _, err := validator.ValidateCreate(ctx, obj)
151151 // Expect(err).To(HaveOccurred())
152- //})
152+ // })
153153 //
154- //It("Should deny creation if datalayer has style without visualization but there is no mapfile set", func() {
154+ // It("Should deny creation if datalayer has style without visualization but there is no mapfile set", func() {
155155 // nestedLayers1 := obj.Spec.Service.Layer.Layers
156156 // nestedLayers2 := nestedLayers1[0].Layers
157157 // nestedLayers2[0].Styles[0].Visualization = nil
158158 // _, err := validator.ValidateCreate(ctx, obj)
159159 // Expect(err).To(HaveOccurred())
160- //})
160+ // })
161161 //
162- //It("Should deny creation if datalayer has style with visualization but there is also a mapfile set", func() {
162+ // It("Should deny creation if datalayer has style with visualization but there is also a mapfile set", func() {
163163 // obj.Spec.Service.Mapfile = &pdoknlv3.Mapfile{ConfigMapKeyRef: corev1.ConfigMapKeySelector{Key: "mapfile.map"}}
164164 // _, err := validator.ValidateCreate(ctx, obj)
165165 // Expect(err).To(HaveOccurred())
166- //})
166+ // })
167167 //
168- //It("Should deny creation if grouplayer is not visible", func() {
168+ // It("Should deny creation if grouplayer is not visible", func() {
169169 // nestedLayers1 := obj.Spec.Service.Layer.Layers
170170 // nestedLayers1[0].Visible = false
171171 // _, err := validator.ValidateCreate(ctx, obj)
172172 // Expect(err).To(HaveOccurred())
173- //})
173+ // })
174174 //
175- //It("Should deny creation if grouplayer has data", func() {
175+ // It("Should deny creation if grouplayer has data", func() {
176176 // nestedLayers1 := obj.Spec.Service.Layer.Layers
177177 // nestedLayers1[0].Data = &pdoknlv3.Data{}
178178 // _, err := validator.ValidateCreate(ctx, obj)
179179 // Expect(err).To(HaveOccurred())
180- //})
180+ // })
181181 //
182- //It("Should deny creation if grouplayer has style with visualization", func() {
182+ // It("Should deny creation if grouplayer has style with visualization", func() {
183183 // nestedLayers1 := obj.Spec.Service.Layer.Layers
184184 // nestedLayers1[0].Styles = []pdoknlv3.Style{{Visualization: smoothoperatorutils.Pointer("visualization.style")}}
185185 // _, err := validator.ValidateCreate(ctx, obj)
186186 // Expect(err).To(HaveOccurred())
187- //})
187+ // })
188188 //
189- //It("Should deny update if a label changed", func() {
189+ // It("Should deny update if a label changed", func() {
190190 // for label, val := range obj.Labels {
191191 // obj.Labels[label] = val + "-newval"
192192 // break
193193 // }
194194 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
195195 // Expect(err).To(HaveOccurred())
196- //})
196+ // })
197197 //
198- //It("Should deny update if a label was removed", func() {
198+ // It("Should deny update if a label was removed", func() {
199199 // for label := range obj.Labels {
200200 // delete(obj.Labels, label)
201201 // break
202202 // }
203203 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
204204 // Expect(err).To(HaveOccurred())
205- //})
205+ // })
206206 //
207- //It("Should deny update if a label was added", func() {
207+ // It("Should deny update if a label was added", func() {
208208 // obj.Labels["new-label"] = "test"
209209 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
210210 // Expect(err).To(HaveOccurred())
211- //})
211+ // })
212212 //
213- //It("Should deny update if an inspire block was added", func() {
213+ // It("Should deny update if an inspire block was added", func() {
214214 // oldObj.Spec.Service.Inspire = nil
215215 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
216216 // Expect(err).To(HaveOccurred())
217- //})
217+ // })
218218 //
219- //It("Should deny update if an inspire block was removed", func() {
219+ // It("Should deny update if an inspire block was removed", func() {
220220 // obj.Spec.Service.Inspire = nil
221221 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
222222 // Expect(err).To(HaveOccurred())
223- //})
223+ // })
224224 //
225- //It("Should deny creation if there are no visible layers", func() {
225+ // It("Should deny creation if there are no visible layers", func() {
226226 // obj.Spec.Service.Layer.Layers = nil
227227 // obj.Spec.Service.Layer.Visible = false
228228 //
229229 // _, err := validator.ValidateUpdate(ctx, oldObj, obj)
230230 // Expect(err).To(HaveOccurred())
231- //})
231+ // })
232232 })
233233
234234})
0 commit comments