Skip to content

Conversation

@rahmabPublic
Copy link
Collaborator

Description

Unit tests uitwerken voor WMS Kind in mapserver-operator conform ansible-operator
https://kadaster.atlassian.net/browse/PDOK-17792

Type of change

Unittest bouwen

Checklist:

  • I've double-checked the code in this PR myself
  • I've left the code better than before (boy scout rule)
  • The code is readable, comments are added that explain hard or non-obvious parts.
  • I've expanded/improved the (unit) tests, when applicable
  • I've run (unit) tests that prove my solution works
  • There's no sensitive information like credentials in my PR

volumeMounts = []v1.VolumeMount{
{Name: "base", MountPath: "/srv/data", ReadOnly: false},
{Name: "data", MountPath: "/var/www", ReadOnly: false},
// TODO: de volgende volAmount is bedoeld voor CR met mapfile. Bouw daarvoor een aparte test voor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er zou inderdaad nog een test toegevoegd kunnen worden voor een CR met statische mapfile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik ga het bouwen. Thanks

typeNamespacedNameWms.Name = sampleWms.Name
Expect(err).NotTo(HaveOccurred())
sampleWms.Spec.Options.RewriteGroupToDataLayers = smoothoperatorutils.Pointer(false)
//sampleWms.Spec.Options.DisableWebserviceProxy = smoothoperatorutils.Pointer(true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze regel in commentaar kan weg.

}
volumes = append(volumes, lgVolume, figVolume)
stylingFilesVolume := v1.Volume{
Name: "styling-files",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze naam zou een constant kunnen zijn net zoals bovenstaande ConfigMap...VolumeNames

}

if obj.Type() == pdoknlv3.ServiceTypeWMS {
stylingFilesVolAm := corev1.VolumeMount{Name: "styling-files", MountPath: "/styling", ReadOnly: true}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De naam "styling-files" zou een constant kunnen worden.

@jelledijkstra97 jelledijkstra97 merged commit 99685e6 into master Apr 29, 2025
2 of 6 checks passed
@rahmabPublic rahmabPublic deleted the pdok-17792-wms-operator-unittest branch April 30, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants