test: migrate project-namespace-init from infra (WIP)#682
Draft
ecv wants to merge 1 commit into
Draft
Conversation
Migrate the Project namespace-init contract test out of datum-cloud/infra (infra#3006) into milo's local-env Chainsaw harness. The original validated that a new Project's control plane is provisioned with a usable default namespace; it ran against a live environment via datumctl and was permanently skipped in infra. Milo owns the resourcemanager.miloapis.com contract and its local env provisions project control planes, so the test runs here pre-merge. Key changes from the infra original: - Drop the datumctl auth update-kubeconfig steps for both the org and the project control planes; reach the local org and project control planes directly via their apiserver URL-path subresources. - Remove spec.skip; the local apiserver serves the project control plane and its default namespace. - Set up Organization, User, and OrganizationMembership fixtures so the Project can be created in the org control plane. - Assert the default namespace is Active in the project control plane, then create and assert a ConfigMap and Secret in it.
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 Project namespace-init Chainsaw test out of
datum-cloud/infrainto milo's local-env harness attest/resource-management/project-namespace-init/.Flow: create
Organization+User+OrganizationMembership→ createProjectin the org control plane → waitReady→ switch to the project control plane → assert thedefaultnamespace isActive→ create + assert aConfigMapand aSecretin it.Why
Per
datum-cloud/infra#3006, single-service API-contract tests are being evacuated from infra's live-env suite to their owning repos and run against milo's local apiserver pre-merge. This validates theresourcemanager.miloapis.comproject-control-plane provisioning contract, which milo owns.The infra original was permanently
skip: trueand depended ondatumctllive-auth for both the org and project control planes.Refs:
datum-cloud/infra#3006(consolidation / evacuation)datum-cloud/infra#3005Adaptation from the infra original
datumctl auth update-kubeconfigsteps (org CP and project CP) and the live-auth kubeconfig plumbing..../v1alpha1/projects/<project>/control-plane, matching the existingquota/multi-cluster-enforcementtest which already provisions a project CP and writes a Secret to itsdefaultnamespace.spec.skip: true; added Organization/User/OrganizationMembership fixtures; added aspec.description; zero inline comments per repo convention.chainsaw lint: passes.Known-uncertain
The local env DOES provision project control planes — confirmed:
test/quota/multi-cluster-enforcementalready creates a Project in the org CP, then targets.../projects/<name>/control-planeand creates aSecretin itsdefaultnamespace. So this test was ported at full fidelity (default-namespace assertion + ConfigMap + Secret), not degraded.Remaining uncertainty:
Ready60s,defaultnamespaceActive60s) mirror sibling tests but were not executed end-to-end in this branch (no live CI run performed — do not block on CI here).defaultlazily/slower than the org namespace, the 60s wait on the namespace may need bumping.