Skip to content

test(e2e): chunked suite, pretty report, teardown hardening, driver-load capture#559

Merged
sajmera-pensando merged 1 commit into
ROCm:mainfrom
spraveenio:cherry/e2e-chunked-suite
May 28, 2026
Merged

test(e2e): chunked suite, pretty report, teardown hardening, driver-load capture#559
sajmera-pensando merged 1 commit into
ROCm:mainfrom
spraveenio:cherry/e2e-chunked-suite

Conversation

@spraveenio
Copy link
Copy Markdown
Contributor

@spraveenio spraveenio commented May 27, 2026

cp of https://github.com/pensando/gpu-operator/pull/1468

What changed

Makefile — auto-discovered chunks

  • File-per-chunk: chunks derived from *_test.go filenames, no catalog to maintain
  • Numeric prefix for ordering: 01_cluster_core, 02_cluster_upgrade_policy run first
  • Single -test.timeout=45m flag; override via TEST_ARGS

Test file split (cluster_test.go → 4 files)

File Tests Suite
01_cluster_core_test.go 14 driver-install DriverInstallSuite
02_cluster_upgrade_policy_test.go 15 upgrade DriverInstallSuite
cluster_rbac_test.go 7 RBAC + SM E2ESuite
cluster_helpers_test.go 41 helpers + consts E2ESuite

New: DriverInstallSuite — wraps E2ESuite with wipeDriverState pre/post so driver-install chunks start on a clean cluster.

Teardown hardeningFatalfErrorf+continue so cleanup runs even on failure.

TestMonitor

  • CaptureRunnerBaseline at SetUpSuite; CaptureDriverState at TearDownTest on failure
  • leafTestName() normalizes E2ESuite.TestXTestX for the renderer

chunk_report.py — Python stdlib chunk-report renderer; ANSI + plain mirror; UTF-8 safe. Tests synthesize fixtures inline (no fixture files), 11/11 pass.

Renamesdcm_e2e_test.godcm_test.go, dra_driver_test.godra_test.go

.gitignore

Added docs-internal/* — matches existing ci-internal/* / tools-internal/* pattern; planning docs are developer-local artifacts.

🤖 Generated with Claude Code

…oad capture

Cherry-pick of f210673a, excluding docs-internal/superpowers/** (added
docs-internal/* to .gitignore to match the ci-internal/tools-internal
pattern — planning/design docs are developer-local, not repo artifacts).

Changes from original commit:
- Chunked Makefile: auto-discovered chunks via *_test.go glob, numeric
  prefix for ordering (01_cluster_core, 02_cluster_upgrade_policy), single
  CHUNK_TIMEOUT via -test.timeout=45m, dropped per-chunk timeout map.
- Split cluster_test.go (3347 lines) into four files:
    01_cluster_core_test.go          (14 driver-install tests, *DriverInstallSuite)
    02_cluster_upgrade_policy_test.go (15 upgrade tests, *DriverInstallSuite)
    cluster_rbac_test.go             ( 7 RBAC + SM tests, *E2ESuite)
    cluster_helpers_test.go          (41 helpers + const block, *E2ESuite)
- New driver_install_suite_test.go: DriverInstallSuite wraps E2ESuite with
  wipeDriverState pre/post step for clean cluster across driver-install chunks.
- TearDownTest/Suite Fatalf -> Errorf+continue to preserve cleanup on failure.
- TestMonitor: CaptureRunnerBaseline (SetUpSuite) + CaptureDriverState
  (TearDownTest on c.Failed); leafTestName() helper normalizes suite-prefixed
  test names; unit tests cover both E2ESuite.* and DriverInstallSuite.* paths.
- New chunk_report.py: Python stdlib chunk-report renderer (ANSI + plain
  mirror, discovery-based, UTF-8 encoding); test_chunk_report.py uses inline
  fixtures via textwrap.dedent (no fixture files), 11/11 unit tests pass.
- Renamed dcm_e2e_test.go -> dcm_test.go, dra_driver_test.go -> dra_test.go.
- .markdownlint-cli2.jsonc: add **/docs-internal/** to ignore list.

Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@yansun1996 yansun1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@sajmera-pensando sajmera-pensando merged commit 8e4d3b4 into ROCm:main May 28, 2026
3 checks passed
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.

3 participants