test(storcli2): on-hardware e2e harness + sibling layout#74
Open
g-carre wants to merge 4 commits into
Open
Conversation
Add a manual on-hardware harness for the storcli2/perccli2 composition adapter and reorganise the integration harnesses so each adapter lives in its own clearly-identifiable sibling directory: - tests/integration/mdadm/ (moved existing software-RAID harness) - tests/integration/storcli2/ (new) The storcli2 harness is argument-driven: a bare invocation is read-only and prints the controller / physical-drive / logical-volume inventory as markdown tables; create, add, delete and the full create -> assert-remove-unsupported -> expand -> delete scenario are destructive and run only with -confirm. Drive removal is exercised as a negative case since storcli2 does not support it. The same composition serves storcli2 and perccli2 via the -binary flag. A README documents both harnesses and the cross-compile build line. Issue: ARTESCA-17652
Add `make build-e2e-mdadm`, `make build-e2e-storcli2` and the aggregate `make build-e2e` (also wired into `make all`) to build the on-hardware integration harnesses into bin/. The harnesses are manual and destructive, so they are never run in CI, but a new build-e2e pre-merge job compiles them so a change to the adapters cannot silently break them. Ignore the bin/ build output directory. Issue: ARTESCA-17652
Satisfy the prealloc linter by sizing the drives slice to the parsed parts instead of growing it from nil. Issue: ARTESCA-17652
Build the e2e harnesses with CGO disabled for linux/amd64 so the resulting binaries are statically linked and depend on no glibc, letting a single binary run on both Rocky Linux 8 (glibc 2.28) and Rocky Linux 9 (glibc 2.34). The target is overridable via E2E_GOOS / E2E_GOARCH. Update the README accordingly. Issue: ARTESCA-17652
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a manual on-hardware e2e harness for the storcli2/perccli2 composition adapter (ARTESCA-17652) and reorganizes the integration harnesses so each adapter is clearly identifiable in its own sibling directory. Stacked on #73.
storcli2 harness — argument-driven
-confirm:create,add(expand),delete, and a fullscenario(create → assert drive-removal unsupported → optional expand → delete).ErrFunctionNotSupportedByImplementation) rather than mutating the array.-binary(point it atperccli2for PERC).Notes / deviations from the ticket
tests/e2e-storcli2/— per request, both adapters now sit side by side undertests/integration/{mdadm,storcli2}/for clarity.-confirm, as discussed.pkg/implementation/...andpkg/core(notpkg/infrastructure); cross-compile line documented in the README andmain.go.Testing
go build ./...,go vet ./tests/integration/...,gofmt, and the full unit suite pass. Verified locally that the default inventory fails gracefully (no panic) when the binary is absent, and that destructive commands refuse to run without-confirm.Issue: ARTESCA-17652
🤖 Generated with Claude Code