Skip to content

🌱 Add make targets for running single e2e scenarios - #2790

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
pedjak:e2e-single-test-run
Jul 1, 2026
Merged

🌱 Add make targets for running single e2e scenarios#2790
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
pedjak:e2e-single-test-run

Conversation

@pedjak

@pedjakpedjak commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Add developer-facing Makefile targets for running individual Godog e2e scenarios
without full suite setup/teardown on each iteration.

What's new

make e2e/<feature>/<scenario-prefix> — runs e2e scenarios matching a name
prefix against an already-running cluster. The prefix is resolved to godog's
native file.feature:LINE syntax using the Gherkin parser in TestMain.

make e2e/install # all scenarios in install.feature
make e2e/install/Install # scenarios starting with "Install"
make "e2e/install/Install latest"# prefix with spaces

make e2e-setup / make experimental-e2e-setup — create persistent KIND
clusters with OLM deployed for iterative development (no teardown after tests).

make e2e-teardown / make experimental-e2e-teardown — delete the clusters
when done.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

CopilotAI review requested due to automatic review settings June 30, 2026 13:20
@openshift-ci
openshift-ciBot requested review from dtfranz and trgeigerJune 30, 2026 13:20
@netlify

netlifyBot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit1834117
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/6a4500db75870000070956c6
😎 Deploy Previewhttps://deploy-preview-2790--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changesRun an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pedjak
pedjak requested review from perdasilva and removed request for trgeigerJune 30, 2026 13:23

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds developer-facing support for running individual Godog e2e scenarios against a persistent KIND cluster, enabling faster iteration without per-run cluster setup/teardown. This fits the operator-controller development workflow by improving local e2e debugging loops while reusing the existing Godog-based suite harness.

Changes:

  • Introduces persistent cluster lifecycle targets (e2e-setup / experimental-e2e-setup and matching teardown targets).
  • Adds a new --e2e.scenario flag and Gherkin-based scenario prefix → file.feature:LINE resolution in the e2e TestMain.
  • Documents the iterative workflow and the new scenario-selection flag.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
test/e2e/README.mdDocuments persistent cluster workflow and single-scenario make targets.
test/e2e/features_test.goAdds --e2e.scenario flag and Gherkin parsing to map scenario prefixes to file:line filters.
MakefileAdds setup/teardown targets and an e2e/% pattern target for running a single feature/prefix.
go.modPromotes gherkin/messages dependencies to direct requirements for the new parsing code.
AGENTS.mdUpdates contributor guidance with the iterative e2e workflow and examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadtest/e2e/features_test.go Outdated
Comment threadMakefile
.PHONY: e2e/%
e2e/%: E2E_TIMEOUT ?= 20m
e2e/%: KUBECONFIG ?= $(KUBECONFIG_DIR)/operator-controller-e2e.kubeconfig
e2e/%: #EXHELP Run e2e scenario against a cluster created by e2e-setup or experimental-e2e-setup (tear down with e2e-teardown).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: added explicit KUBECONFIG override example for the experimental cluster in the help text and documentation.

Comment threadtest/e2e/README.md
Comment threadAGENTS.md
Comment on lines +121 to +123
make e2e/install E2E_TIMEOUT=30m # Override timeout
make e2e/install KUBECONFIG=~/.kube/config # Override kubeconfig

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: added an explicit example showing KUBECONFIG override for the experimental cluster.

Comment threadtest/e2e/features_test.go
@codecov

codecovBot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.29%. Comparing base (c3caa22) to head (2f2e70d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2790 +/- ##
==========================================
- Coverage 70.44% 70.29% -0.16% 
==========================================
Files 143 142 -1 Lines 10625 10577 -48 ==========================================
- Hits 7485 7435 -50 - Misses 2579 2580 +1 - Partials 561 562 +1 
FlagCoverage Δ
e2e35.12% <ø> (+<0.01%)⬆️
experimental-e2e52.53% <ø> (+0.11%)⬆️
unit59.32% <ø> (-0.19%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pedjak
pedjakforce-pushed the e2e-single-test-run branch from 447c53c to 2f2e70dCompareJune 30, 2026 13:59

@tmshorttmshort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments

Comment threadMakefile Outdated
Comment on lines 449 to 451
test-e2e: kind-clean-e2e #HELP Run e2e test suite on local kind cluster
test-experimental-e2e: kind-clean-experimental-e2e #HELP Run experimental e2e test suite on local kind cluster

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be with the other test-e2e/test-experimental-e2e lines?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are — e2e-setup and experimental-e2e-setup are placed immediately after the test-e2e/test-experimental-e2e lines. They mirror the same variant-specific variable overrides (E2E_SOURCE_MANIFEST, E2E_RELEASE_MANIFEST, KIND_CONFIG) and depend on the same wait-% chain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean should they be moveI mean, should these lines be moved up to ~340

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — setup variable overrides moved up next to the test-e2e/test-experimental-e2e overrides block.

Comment threadMakefile
Comment threadMakefile Outdated
Comment on lines +463 to +469
.PHONY: e2e-teardown
e2e-teardown: $(KIND) #EXHELP Delete the standard e2e KIND cluster.
$(KIND) delete cluster --name operator-controller-e2e

.PHONY: experimental-e2e-teardown
experimental-e2e-teardown: $(KIND) #EXHELP Delete the experimental e2e KIND cluster.
$(KIND) delete cluster --name operator-controller-experimental-e2e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to combine these with kind-clean-% or parameterize them to avoid duplication?
(Yes, I know you can't depend on kind-clean-% directly, but maybe they can call a common recipe?)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing kind-clean-% has a dependency on e2e-coverage-% (which depends on e2e-run-%, etc.), so we can't reuse it directly without pulling in the entire test chain. We could extract a kind-delete-% recipe that both kind-clean-% and e2e-teardown call, but that would touch the existing targets from #2785. Happy to do it if you think it's worth it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to have 3 recipes basically doing the same thing, and possibly getting out of sync.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed — with #2792 merged, kind-clean-% is now standalone. Teardown targets are prereq-only delegations to kind-clean-operator-controller-e2e / kind-clean-operator-controller-experimental-e2e, zero recipe duplication.

Comment threadMakefile Outdated
.PHONY: e2e-setup
e2e-setup: E2E_SOURCE_MANIFEST := $(STANDARD_E2E_MANIFEST)
e2e-setup: E2E_RELEASE_MANIFEST := $(STANDARD_RELEASE_MANIFEST)
e2e-setup: wait-e2e #EXHELP Create a KIND cluster with standard OLM deployed for iterative e2e testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, let me understand this, since this changed recently (and I didn't get a chance to review):

test-% -> kind-clean-%
kind-clean-% -> e2e-coverage-%
e2e-coverage-% -> e2e-run-%
e2e-run-% -> prometheus-%
prometheus-% -> wait-% << SAME
%-setup -> wait-% << SAME
wait-% -> lint-deployed-%
lint-deployed-% -> kind-deployed-%
kind-deploy-% -> kind-load-% manifests
kind-load-% -> kind-cluster-%
kind-cluster-% -> docker-build

So, basically you strung these out as parameterized recipes, rather than having a long list of dependencies on a single target?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — the chain is exactly as you describe. The pattern rules were introduced in #2785, and the %-setup targets in this PR reuse the same chain, just stopping at wait-% instead of continuing through e2e-run-%e2e-coverage-%kind-clean-%.

CopilotAI review requested due to automatic review settings July 1, 2026 11:47
@pedjak
pedjakforce-pushed the e2e-single-test-run branch from 2f2e70d to 0036574CompareJuly 1, 2026 11:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Add `make e2e/<feature>/<scenario-prefix>` for running individual Godog
scenarios by name prefix against an already-running cluster. The prefix
is resolved to godog's file:line syntax using the Gherkin parser.
Add `e2e-setup` and `experimental-e2e-setup` targets to create persistent
KIND clusters for iterative development, with matching `e2e-teardown` and
`experimental-e2e-teardown` for cleanup.
Co-Authored-By: Claude <noreply@anthropic.com>
@pedjak
pedjakforce-pushed the e2e-single-test-run branch from 0036574 to 1834117CompareJuly 1, 2026 11:58
@pedjak
pedjak requested a review from tmshortJuly 1, 2026 12:14

@tmshorttmshort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ciopenshift-ciBot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 1, 2026
@tmshort

Copy link
Copy Markdown
Contributor

/lgtm cancel

Did not mean to do lgtm and approve!

@openshift-ciopenshift-ciBot removed the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2026
@perdasilva

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2026
@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rashmigottipati, tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-botBot merged commit 88bd84f into operator-framework:mainJul 1, 2026
23 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@pedjak@tmshort@perdasilva@rashmigottipati