Skip to content

doc: E2E Test Coverage Proposal#296

Open
maboras-rh wants to merge 2 commits into
centos-automotive-suite:mainfrom
maboras-rh:e2e-proposal
Open

doc: E2E Test Coverage Proposal#296
maboras-rh wants to merge 2 commits into
centos-automotive-suite:mainfrom
maboras-rh:e2e-proposal

Conversation

@maboras-rh

@maboras-rh maboras-rh commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • CI/CD improvement
  • Refactoring

Testing

  • Unit tests pass (make test)
  • Linter passes (make lint)
  • Manifests are up to date (make manifests generate)
  • Tested on OpenShift cluster (if applicable)

Summary by CodeRabbit

  • Tests
    • Added a new E2E testing coverage proposal that documents the current E2E baseline and gaps, introduces a prioritized test matrix (#1–61), and outlines expected CI/workflow trigger changes.
    • Includes guidance for mapping labels to test sets/clusters, aggregated smoke/E2E totals, and a phased rollout plan through smoke, advanced, and nightly coverage, with longer-term goals like higher coverage, multi-arch, quarantine for flaky tests, resilience/upgrade/chaos, and result dashboarding.

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a documentation-only E2E test coverage proposal recording the current baseline, a prioritized matrix of 61 test scenarios, CI/workflow execution and trigger changes, a phased implementation plan, and future expansion goals.

Changes

E2E Test Coverage Proposal

Layer / File(s) Summary
Current coverage baseline and gap analysis
test/e2e/e2e-test-coverage-proposal.md (lines 1–50)
Documents existing E2E tests and CI workflows with a component-by-component coverage gap analysis and a checklist of what is not tested today.
Prioritized E2E test matrix (61 scenarios)
test/e2e/e2e-test-coverage-proposal.md (lines 51–134)
Defines 61 prioritized E2E test cases covering operator core checks, CRD availability, OperatorConfig readiness, CR lifecycle smoke tests, Build API endpoints, auth scenarios, ImageBuild/ContainerBuild/Workspace flows, Image/Catalog/ImageReseal/Flash scenarios, negative/error and cleanup/TTL cases.
CI/workflow changes and label mapping
test/e2e/e2e-test-coverage-proposal.md (lines 135–166)
Specifies CI/workflow changes (smoke-by-default filtering, PR comment triggers, auth nightly schedule), label-to-test-set/cluster runtime mapping, and aggregated coverage metrics.
Phased implementation plan
test/e2e/e2e-test-coverage-proposal.md (lines 169–178)
Outlines a five-phase rollout plan mapping week targets to test case subsets, deliverables, cluster targets, CI triggers, and estimated effort.
Future planning and roadmap
test/e2e/e2e-test-coverage-proposal.md (lines 181–212)
Outlines short-, mid-, and long-term goals including merge/gating behavior, higher coverage targets, nightly full-suite runs, multi-arch expansion, flaky test quarantine, OpenShift-specific smoke lanes, resilience/upgrade/chaos testing, hardware-in-the-loop, security scanning, and dashboards.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • bkhizgiy
  • bennyz

Poem

🐰 A testing blueprint hops into view,
Baselines and matrices—all tidy and new!
Sixty-one scenarios, phases set to glide,
Workflows and labels mapped, together they guide.
The rabbit cheers: test coverage, certified!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding E2E test coverage proposal documentation to the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maboras-rh maboras-rh self-assigned this May 31, 2026
| `catalogimage` | #12, #53–55, #61 | `/e2e-catalogimage` PR comment | Kind + OpenShift | ~3 min |
| `traditional` | #23 | `/e2e-traditional` PR comment | OpenShift only | ~30 min |
| `bootc` | Existing bootc lane | `/e2e-bootc` PR comment | Kind + OpenShift | ~20 min |
| `auth` | #50, #51 + existing auth tests | Nightly + `/e2e-auth` | OpenShift only | ~5 min |

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.

how 5 minutes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this been tested on existing CRC OpenShift local cluster. at took even <5minutes

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated
|-------|-------|---------|---------|---------|
| `smoke` | #1–19 (superset of `operator`) | Every PR push (default) | Kind + OpenShift | < 2 min |
| `operator` | #1–5 (subset of `smoke`, existing `operator_test.go` tests only) | `/e2e-operator` PR comment | Kind + OpenShift | ~3 min |
| `catalogimage` | #12, #53–55, #61 | `/e2e-catalogimage` PR comment | Kind + OpenShift | ~3 min |

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.

it's not an implemented feature, we can skip it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated.

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
test/e2e/e2e-test-coverage-proposal.md (1)

150-150: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Runtime target for smoke is likely under-estimated and conflicts with the proposed scope.

smoke is defined as tests #1–19, but runtime is listed as < 2 min; that seems inconsistent with both the expanded scope and the current benchmark baselines. Please re-baseline this estimate (or reduce smoke scope) to avoid setting incorrect CI expectations.

Also applies to: 173-173

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/e2e-test-coverage-proposal.md` at line 150, The runtime estimate for
the "smoke" target (tests `#1`–19) is inconsistent with its defined scope and
current baselines: update the "smoke" entry so the CI expectation is realistic
by either reducing the scope of `smoke` (e.g., move some tests out of tests
`#1`–19 into a separate target) or re-baselining the runtime from "< 2 min" to an
empirically measured value that matches the expanded scope; make the change
where the "smoke" row is defined (the table cell containing `smoke` and tests
`#1`–19 and the runtime value) and propagate the same correction to the other
occurrence referenced (line ~173).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/e2e-test-coverage-proposal.md`:
- Line 47: Update the awkward wording on the unimplemented coverage line: change
the line that currently reads "No CatalogImage, ContainerBuild, Workspace,
ImageReseal, or Flash coverage (not implemented feature)" to a clearer phrasing
such as "No coverage for CatalogImage, ContainerBuild, Workspace, ImageReseal,
or Flash (features not yet implemented)"; locate the sentence referencing
CatalogImage, ContainerBuild, Workspace, ImageReseal, and Flash and replace the
parenthetical to the pluralized, tightened form.

---

Duplicate comments:
In `@test/e2e/e2e-test-coverage-proposal.md`:
- Line 150: The runtime estimate for the "smoke" target (tests `#1`–19) is
inconsistent with its defined scope and current baselines: update the "smoke"
entry so the CI expectation is realistic by either reducing the scope of `smoke`
(e.g., move some tests out of tests `#1`–19 into a separate target) or
re-baselining the runtime from "< 2 min" to an empirically measured value that
matches the expanded scope; make the change where the "smoke" row is defined
(the table cell containing `smoke` and tests `#1`–19 and the runtime value) and
propagate the same correction to the other occurrence referenced (line ~173).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69fcf81d-5b0b-4cb3-a3c4-574afca517be

📥 Commits

Reviewing files that changed from the base of the PR and between ee19990 and a3763fb.

📒 Files selected for processing (1)
  • test/e2e/e2e-test-coverage-proposal.md

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated
@maboras-rh

Copy link
Copy Markdown
Contributor Author

@ambient-code please review

@ambient-code ambient-code Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This is a well-structured and thorough E2E testing proposal. The phased rollout plan, label strategy, and CI workflow changes are well-thought-out. The gap analysis is a valuable contribution. A few factual corrections needed before this is ready to merge:

Factual Issues

1. API route count is significantly undercounted (24 → 44+)

The proposal claims "24 total" Build API routes. Actual count from the source:

Group Routes Source
Builds 10 server.go
Flash 4 server.go
Container Builds 5 server.go
Config 1 server.go
Auth 1 server.go
Infrastructure (healthz, openapi, metrics) 3 server.go
Sealed/ImageReseal 4 sealed.go
Workspace 12 workspace.go
Catalog 6 catalog/routes.go
Total 46

This affects the coverage percentage calculations in the Coverage Gap Analysis and Summary tables.

2. Workspace API routes undercounted (9 → 12)

The Coverage Gap Analysis table says Workspace has 9 API routes. Actual count from workspace.go: POST (create), GET (list), GET/:name, DELETE/:name, POST/:name/start, POST/:name/stop, POST/:name/sync, POST/:name/sync/plan, POST/:name/exec, GET/:name/shell, POST/:name/deploy, PUT/:name/lease = 12 routes.

3. "CatalogImage not yet implemented" is incorrect

The "What Is NOT Tested Today" section says "CatalogImage not yet implemented", but it is — there is a full controller (internal/controller/catalogimage/) with audit, metrics, and publisher modules, plus 6 API routes in internal/buildapi/catalog/routes.go (list, create, get, delete, verify, publish). The CRD controller and API are functional; what's missing is E2E test coverage, not the implementation.

4. Flash and Catalog missing from Coverage Gap Analysis table

The per-component table omits Flash (4 API routes in server.go) and Catalog (6 API routes in catalog/routes.go) as separate line items. These should be listed to give a complete picture.

Observations (non-blocking)

  • The phasing is sensible — smoke first, then core lifecycle, then extended coverage.
  • Phase 1 smoke suite target of <2 min CI time on every PR is a meaningful improvement over the current ~30 min full suite.
  • Test #12 (CatalogImage reaches Available) depends on public registry access — worth noting this may need a fallback or skip in air-gapped environments.
  • The "Future Planning" section's 90% coverage target is ambitious given the current ~8% baseline. The intermediate 40% and 70% milestones are realistic checkpoints.
  • Consider adding a note about test data/fixture management strategy (e.g., shared manifests, test image references) since many tests will need similar setup.

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated
| Build API | — | — | 24 total | 0 (healthz only) | ~4% |
| Authentication | — | — | 1 | 3 (OIDC only, OpenShift) | ~30% |
| Bootc Build | — | — | — | 1 (full build) | ~80% |
| **Total** | **7** | **7** | **24** | **8** | **~8%** |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The route count here is 24 but the actual total across all Build API route registrations is 46 (see server.go, sealed.go, workspace.go, and catalog/routes.go). This also affects the ~4% coverage estimate.

Suggested change
| **Total** | **7** | **7** | **24** | **8** | **~8%** |
| Build API | | | 46 total | 0 (healthz only) | ~2% |

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated
| Workspace | 1 | 1 | 9 | 0 | 0% |
| ImageReseal | 1 | 1 | 4 | 0 | 0% |
| OperatorConfig | 1 | 1 (48+ handlers) | 1 | 4 (resource existence only) | ~10% |
| Build API | — | — | 24 total | 0 (healthz only) | ~4% |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Workspace has 12 API routes, not 9. Missing: POST /:name/sync/plan, POST /:name/exec, PUT /:name/lease.

Suggested change
| Build API | | | 24 total | 0 (healthz only) | ~4% |
| Workspace | 1 | 1 | 12 | 0 | 0% |

Comment thread test/e2e/e2e-test-coverage-proposal.md Outdated
- No cleanup/garbage-collection tests (owner references, TTL expiry, finalizers)
- No package mode AIB disk image build test
- No smoke test label — every PR runs the full suite (~30 min)
- No CatalogImage, ContainerBuild, Workspace, ImageReseal, or Flash coverage (CatalogImage not yet implemented)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CatalogImage is implemented — there's a full controller at internal/controller/catalogimage/ (with audit, metrics, publisher) and 6 API routes in internal/buildapi/catalog/routes.go (list, create, get, delete, verify, publish). The parenthetical should be removed.

Suggested change
- No CatalogImage, ContainerBuild, Workspace, ImageReseal, or Flash coverage (CatalogImage not yet implemented)
- No CatalogImage, ContainerBuild, Workspace, ImageReseal, or Flash coverage

@maboras-rh

Copy link
Copy Markdown
Contributor Author

/e2e-operator

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/e2e-test-coverage-proposal.md`:
- Line 206: The coverage target at line 206 states "24 API routes" but the
baseline table earlier in the document counts 46 total routes. Update the "24
API routes" reference in the coverage target line to reflect the correct
baseline count of 46 total routes, ensuring consistency across the entire
proposal and making the 90% coverage target interpretation clear and aligned
with the documented baseline.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 25c46b45-1f70-4f7b-9ceb-1b54c205408f

📥 Commits

Reviewing files that changed from the base of the PR and between dda5d4c and bd7fc3c.

📒 Files selected for processing (1)
  • test/e2e/e2e-test-coverage-proposal.md


| Goal | Description | Depends On |
|------|-------------|------------|
| Coverage target: 90% | Full coverage of all 7 CRDs, 24 API routes, auth flows, error paths, cleanup, and edge cases. | All phases |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align the long-term API-route target with the baseline table.

Line 206 says “24 API routes,” but the baseline above already counts 46 total routes. That makes the 90% target inconsistent with the rest of the proposal and hard to interpret.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/e2e-test-coverage-proposal.md` at line 206, The coverage target at
line 206 states "24 API routes" but the baseline table earlier in the document
counts 46 total routes. Update the "24 API routes" reference in the coverage
target line to reflect the correct baseline count of 46 total routes, ensuring
consistency across the entire proposal and making the 90% coverage target
interpretation clear and aligned with the documented baseline.

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.

2 participants