Skip to content

ci: add CLI management tests for target, LU, and TPGT commands - #130

Merged
carmark merged 4 commits into
masterfrom
ci/add-cli-management-tests
Mar 14, 2026
Merged

ci: add CLI management tests for target, LU, and TPGT commands#130
carmark merged 4 commits into
masterfrom
ci/add-cli-management-tests

Conversation

@carmark

@carmark carmark commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a new CLI management test step to the GitHub Actions CI pipeline
  • Tests the full CRUD lifecycle of the new management commands against a running daemon:
    • list target / list lu / list tpgt (verify existing config is visible)
    • create target -> verify new target appears in list
    • create lu -> verify new LU appears in list
    • rm lu -> verify LU is removed from list
    • rm target -> verify target is removed from list
  • Each step validates output with grep assertions for clear pass/fail

Test plan

  • CI pipeline passes (build + unit tests + libiscsi + CLI management tests)

🤖 Generated with Claude Code

carmark and others added 4 commits March 14, 2026 20:40
Add a new "CLI management test" step to the CI pipeline that exercises
the full lifecycle of the new management commands against a running
daemon:

- list target / list lu / list tpgt (read existing config)
- create target -> verify in list
- create lu -> verify in list
- rm lu -> verify removed
- rm target -> verify removed

Each step validates output with grep assertions so failures are
immediately visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gotgt CLI client prepends /v{version}/ to API paths, but when built
from untagged commits the version is a git SHA that doesn't match the
server's version route regex. Use curl to hit the API directly instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SCSILu.Path field is not populated during LU creation, so grep
for the file path won't work. Use python3 JSON validation to check
the array length instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Go's json.Encode outputs null for nil slices. Handle both null and
empty array in the LU removal verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@carmark
carmark merged commit 6795026 into master Mar 14, 2026
1 check 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.

1 participant