Skip to content

Commit 784347b

Browse files
authored
Extend e2e chainsaw tests (#249)
Adds new e2e tests for IpAddressClaim and IpRangeClaim and aligns naming of all test resources (folder names, chainsaw test names and prefixes for k8s CRs). Changes: Remove netboxOperatorRestorationHash from assertions everywhere except in the restoration and parentPrefixSelector tests Naming: All tests now have a .metadata.name compatible name. This name is used in the path of the file in git, in the .metadata.name of the chainsaw Test yaml and as name (prefix) for all CRs involved (e.g. PrefixClaim, IpAddressClaim, IpRangeClaim) Steps are now smaller to be more self explanatory. Descriptions were removed where the step name was sufficient. Added an annotation called description to Chainsaw Test resources to allow for further explanation (What does the test do?) Updated the data loading script to include a description to prefixes (helps for better visibility in NetBox) Tweaked timeouts for chainsaw tests and resource limits for the NetBox deployment (was OOMKilled which had quite the impact on the Pipeline) to make pipeline more reliable Added apply & update test for IPv4+IPv6 and IpAddressClaim+IpRangeClaim that expects updates to description and comments to succeed Added Prefix exhaustion test for IPv4+IPv6 and IpAddressClaim+IpRangeClaim that expects for the Claim CR to fail if the ParentPrefix is exhausted Added Restore test for IPv4+IPv6 and IpAddressClaim+IpRangeClaim that expects the same IP Range or IP Address to be assigned when restoring the resource from NetBox. Added a set of tests that verify that invalid CRs will fail. This is currently limited mostly to IP Range and one test for Prefix. All invalid tests created for IP Range can be scaled to IP Address and Prefix in a later stage.
1 parent f45090c commit 784347b

File tree

78 files changed

+3446
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3446
-289
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ create-kind:
190190
.PHONY: deploy-kind
191191
deploy-kind: docker-build-local manifests kustomize
192192
kind load docker-image ${LOCAL_IMG}
193+
kind load docker-image ${LOCAL_IMG} # fixes an issue with podman where the image is not correctly tagged after the first kind load docker-image
193194
$(KUSTOMIZE) build kind | $(KUBECTL) apply -f -
194195

195196
.PHONY: undeploy-kind

0 commit comments

Comments
 (0)