Skip to content

testing: licensed MemgraphCluster bootstrap test#23

Merged
as51340 merged 3 commits into
01-repo-reset-scaffoldfrom
04-e2e-kind-harness
Jul 24, 2026
Merged

testing: licensed MemgraphCluster bootstrap test#23
as51340 merged 3 commits into
01-repo-reset-scaffoldfrom
04-e2e-kind-harness

Conversation

@as51340

@as51340 as51340 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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

  • Multi-node KinD cluster (test/e2e/kind-config.yaml, wired via make setup-test-e2e): 1 control-plane + 3 workers, so HA pods spread across nodes like the chart's multi-node CI.
  • Operator deployment moved to BeforeSuite/AfterSuite (test/e2e/e2e_suite_test.go): namespace, CRDs, and controller are set up once for the whole suite. Scenario containers now only exercise MemgraphCluster behavior — adding a scenario is a new test case, never new pipeline.
  • New scenario (test/e2e/memgraphcluster_test.go): preloads a real Memgraph image, creates the license Secret, applies a minimal MemgraphCluster, and asserts every declared instance appears in SHOW INSTANCES (up) with exactly one MAIN — queried via mgconsole inside a coordinator pod (the HA chart CI's established practice). The leader's view is used, since only the leader reports data-instance roles.
  • CI gate (.github/workflows/test.yml): new required E2E tests job installs KinD and runs make test-e2e.
  • Secret handling: the enterprise license flows from the MEMGRAPH_ENTERPRISE_LICENSE / MEMGRAPH_ORGANIZATION_NAME repository secrets into a Kubernetes Secret applied over stdin (utils.RunWithInput), so no secret material reaches logged command lines or the repo.

Acceptance criteria

  • CI boots a multi-node KinD cluster, builds/deploys the operator image, and applies a MemgraphCluster
  • Suite asserts all declared instances registered in SHOW INSTANCES with exactly one MAIN
  • Enterprise license flows from repository secrets; no secret material in logs or the repo
  • The e2e job is a required PR check
  • Adding a new e2e scenario requires only a new test case, not pipeline changes

Testing

  • make lint, make test-unit green locally; no CRD/RBAC/DeepCopy drift.
  • go vet -tags=e2e ./test/... clean.
  • The e2e job itself requires the license repository secrets and runs in CI on KinD.

Note: base branch is 01-repo-reset-scaffold (the MVP stack's accumulation point), consistent with slices 02 and 03.

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 as51340 self-assigned this Jul 24, 2026
@as51340 as51340 changed the title KinD e2e harness: licensed MemgraphCluster bootstrap proof, PR-gated testing: licensed MemgraphCluster bootstrap test Jul 24, 2026
@as51340
as51340 merged commit 60d1422 into 01-repo-reset-scaffold Jul 24, 2026
5 checks passed
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
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.

1 participant