testing: licensed MemgraphCluster bootstrap test#23
Merged
Conversation
A true end-to-end suite for the provisioning and bootstrap slices: CI boots a multi-node Kind cluster, builds and deploys the operator image into it, applies a MemgraphCluster running real Memgraph images, and asserts every declared instance appears registered in SHOW INSTANCES with exactly one MAIN (queried through mgconsole inside a coordinator pod, the HA chart CI's established practice). Operator deployment (namespace, CRDs, controller) moves from the Manager container into BeforeSuite/AfterSuite, so scenario containers only exercise MemgraphCluster behavior and later slices (re-registration, storage retention) add test cases, not pipeline. The enterprise license flows from the MEMGRAPH_ENTERPRISE_LICENSE / MEMGRAPH_ORGANIZATION_NAME repository secrets into a Kubernetes Secret applied over stdin, so no secret material reaches logged command lines or the repo. Part of specs/operator-mvp/issues/04-kind-e2e-harness.md.
as51340
added a commit
that referenced
this pull request
Jul 24, 2026
* KinD e2e harness: licensed MemgraphCluster bootstrap proof, PR-gated A true end-to-end suite for the provisioning and bootstrap slices: CI boots a multi-node Kind cluster, builds and deploys the operator image into it, applies a MemgraphCluster running real Memgraph images, and asserts every declared instance appears registered in SHOW INSTANCES with exactly one MAIN (queried through mgconsole inside a coordinator pod, the HA chart CI's established practice). Operator deployment (namespace, CRDs, controller) moves from the Manager container into BeforeSuite/AfterSuite, so scenario containers only exercise MemgraphCluster behavior and later slices (re-registration, storage retention) add test cases, not pipeline. The enterprise license flows from the MEMGRAPH_ENTERPRISE_LICENSE / MEMGRAPH_ORGANIZATION_NAME repository secrets into a Kubernetes Secret applied over stdin, so no secret material reaches logged command lines or the repo. Part of specs/operator-mvp/issues/04-kind-e2e-harness.md. * testing: Fix checking for is main * refactor: Move role main under the constants block
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.
Implements
specs/operator-mvp/issues/04-kind-e2e-harness.md— the true end-to-end proof of the provisioning (02) and bootstrap (03) slices.What this adds
test/e2e/kind-config.yaml, wired viamake setup-test-e2e): 1 control-plane + 3 workers, so HA pods spread across nodes like the chart's multi-node CI.BeforeSuite/AfterSuite(test/e2e/e2e_suite_test.go): namespace, CRDs, and controller are set up once for the whole suite. Scenario containers now only exerciseMemgraphClusterbehavior — adding a scenario is a new test case, never new pipeline.test/e2e/memgraphcluster_test.go): preloads a real Memgraph image, creates the license Secret, applies a minimalMemgraphCluster, and asserts every declared instance appears inSHOW INSTANCES(up) with exactly one MAIN — queried viamgconsoleinside a coordinator pod (the HA chart CI's established practice). The leader's view is used, since only the leader reports data-instance roles..github/workflows/test.yml): new requiredE2E testsjob installs KinD and runsmake test-e2e.MEMGRAPH_ENTERPRISE_LICENSE/MEMGRAPH_ORGANIZATION_NAMErepository secrets into a Kubernetes Secret applied over stdin (utils.RunWithInput), so no secret material reaches logged command lines or the repo.Acceptance criteria
MemgraphClusterSHOW INSTANCESwith exactly one MAINTesting
make lint,make test-unitgreen locally; no CRD/RBAC/DeepCopy drift.go vet -tags=e2e ./test/...clean.