Skip to content

testdata: lay out storcli2 fixtures per component package#50

Merged
ezekiel-alexrod merged 1 commit into
mainfrom
improvement/storcli2-testdata-layout
Jun 5, 2026
Merged

testdata: lay out storcli2 fixtures per component package#50
ezekiel-alexrod merged 1 commit into
mainfrom
improvement/storcli2-testdata-layout

Conversation

@ezekiel-alexrod

@ezekiel-alexrod ezekiel-alexrod commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What

storcli2 / perccli2 JSON test fixtures + capture tooling for the decomposed
storcli2 adapter. Foundation PR: no production Go code, only testdata, tooling
and docs.

Layout

Fixtures live next to each component, under <package>/testdata/storcli2/
(mirroring the ssacli adapter): controllergetter (4), physicaldrivegetter
(29), logicalvolumegetter (25), logicalvolumemanager (9), blinker (2).

Tooling

tests/testdata-tools/collect_storcli2_testdata.sh reuses the original capture
script (PR #46) with its logic unchanged — only the output paths are remapped to
the per-component layout, so the result copies straight back:
cp -r ./storcli2_testdata_output/* pkg/implementation/. See its README for the
command-to-file mapping and SAFE vs DESTRUCTIVE modes.

Notes

  • Captured from a real MegaRAID 9660-16i (24 SAS HDDs, 24 RAID0 VDs) and
    re-validated read-only against the live array (0 structural diffs).
  • Three destructive fixtures (cacheoptions/migrate/jbod-disable) were captured
    with storcli v1 syntax and are flagged in the README for regeneration.
  • megaraid (storcli v1) fixtures untouched; no Go changes.

@ezekiel-alexrod ezekiel-alexrod requested a review from a team as a code owner June 5, 2026 13:25
Place the storcli2 capture under each decomposed component's testdata/storcli2/
directory (controllergetter, physicaldrivegetter, logicalvolumegetter,
logicalvolumemanager, blinker), mirroring the ssacli fixture layout. Add
tests/testdata-tools/collect_storcli2_testdata.sh: the capture script from
PR #46 with its command logic unchanged but its output remapped to this
per-component layout, so the result copies straight into pkg/implementation/.
A README documents the command-to-file mapping. The megaraid (storcli v1)
fixtures are untouched. Three set/migrate fixtures captured as syntax-error
text (storcli2 grammar change) are flagged for regeneration.
@ezekiel-alexrod ezekiel-alexrod force-pushed the improvement/storcli2-testdata-layout branch from 051034a to 5be1490 Compare June 5, 2026 13:58
@ezekiel-alexrod ezekiel-alexrod merged commit 6391c82 into main Jun 5, 2026
3 checks passed
@ezekiel-alexrod ezekiel-alexrod deleted the improvement/storcli2-testdata-layout branch June 5, 2026 16:08
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