test: migrate workload-api-acceptance from infra (WIP)#159
Draft
ecv wants to merge 1 commit into
Draft
Conversation
Migrate the Workload API-acceptance contract test out of datum-cloud/infra into the owning repo, per datum-cloud/infra#3006. That issue consolidates infra's live-env Chainsaw suite into one "construct" group and evacuates single-service compute.datumapis.com contract tests to compute, run against the local kind harness pre-merge. This test applies a Workload (plus networking Location/Network fixtures) and asserts the control plane accepts and stores the Workload — API schema and admission only, no wait for VM provisioning. Key changes: - Add test/e2e/workload-api-acceptance/ with the chainsaw test and the location.yaml / network.yaml / workload.yaml fixtures copied from infra. - Drop the datumctl auth update-kubeconfig setup step and the project control-plane cluster block; target a local kind cluster via spec.cluster, mirroring datum-cloud/network-services-operator. - Remove spec.skip: true. - Introduce a minimal, WIP chainsaw harness to the Makefile: kind + chainsaw tool vars, install targets, and a test-chainsaw target that runs chainsaw against the kind cluster. Compute has no chainsaw setup today; this is a proposed harness pending compute-team decision on chainsaw vs. extending the existing Go e2e suite.
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates the
workload-api-acceptanceChainsaw test out ofdatum-cloud/infrainto this repo (the owner of the
compute.datumapis.comWorkload contract), andintroduces a minimal Chainsaw harness to compute, which currently has none.
test/e2e/workload-api-acceptance/(chainsaw test +location.yaml,network.yaml,workload.yamlfixtures copied from infra).Workload(plus networkingLocation/Networkfixtures) and assertsthe control plane accepts and stores the
Workload— API schema + admissiononly, no wait for VM provisioning.
kind+chainsawtool vars/versions/install targets and amake test-chainsawtarget that runschainsaw test ./test/e2eagainst a localkind cluster (mirrors
datum-cloud/network-services-operator).Why
datum-cloud/infra#3006consolidates infra's live-env Chainsaw suite into one"construct" group and evacuates single-service API-contract tests to their owning
repos, to be run against the local kind harness pre-merge. This test validates a
compute.datumapis.comcontract owned by this repo.Related:
datum-cloud/infra#3006,datum-cloud/infra#3005.Adaptations from the infra original
datumctl auth update-kubeconfigsetup step and theclusters:/cluster: projectblocks referencing./test-kubeconfig.spec.cluster: compute-e2e, mirroring NSO.spec.skip: true.Introduces Chainsaw to compute — decision to confirm
Compute has no Chainsaw harness today; its only e2e is the kubebuilder Go
suite (
test/e2e/e2e_test.go,make test-e2e, currently a stub). This PR adds aproposed, WIP Chainsaw harness. The compute team should decide:
e2e and drop the Chainsaw wiring.
The harness wiring here is deliberately minimal and marked WIP so the migration is
reviewable regardless of which path is chosen.
Known-uncertain
networking.datumapis.com(Location,Network). A compute-only local kindenv will not serve these unless NSO CRDs are installed first. The harness does
not install them yet — this needs a decision (install NSO CRDs in the e2e
bring-up, or drop the networking fixtures).
LocationBinding(networking.datumapis.com) during
ValidateCreateand derives valid citycodes from
LocationBinding.Spec.Topology["topology.datum.net/city-code"]. So:cityCodes: [ORD]requires a matchingLocationBinding(the infrafixture applies a
Location, not aLocationBinding) or admission failsInvalid. This is the same class of failure that had the original testskip: true(infra #2733). Resolving it (add aLocationBindingfixture,or run the webhook with location validation relaxed) is left for the
compute-team review.
spec.clustername is assumed to becompute-e2e. Compute's current CIcreates a default-named kind cluster (
kind create cluster→kind). TheMakefile exposes
KIND_CLUSTER ?= compute-e2e; the e2e bring-up should create acluster of that name (or override the var).
kind v0.27.0,chainsaw v0.2.15); adjust to compute's preference.