Skip to content

feat(cli): Add ListOrganizations Feature#253

Open
DerBurri wants to merge 5 commits intomainfrom
add-organization-functions
Open

feat(cli): Add ListOrganizations Feature#253
DerBurri wants to merge 5 commits intomainfrom
add-organization-functions

Conversation

@DerBurri
Copy link
Copy Markdown
Contributor

@DerBurri DerBurri commented May 6, 2026

This commit introduces several improvements to the CLI command testing infrastructure:

  • ListOrganizations: Implemented the first part of the Organizations API. The CLI is no able to list Organizations the User Token belongs too.
  • ClientFactory Pattern: Implemented the ClientFactory pattern for ListOrgCmd and to allow for dependency injection of the Client improving test isolation and enabling more robust unit testing.
  • Command Registration Tests: Added a unit test for AddListOrgCmd to verify that the command is correctly registered with its parent and has the expected properties (Use, Short, RunE).
  • Output Format Validation: Enhanced ListOrganizations tests to capture os.Stdout and validate the actual JSON and YAML output against expected structures, ensuring correct serialization and presentation.
  • Improved Error Handling Tests: Added test cases for ListOrgCmd to cover scenarios where the ClientFactory itself returns an error, ensuring comprehensive error propagation.
  • Test Coverage Integration: Updated the Makefile with coverage and coverage-html targets to easily generate and view test coverage reports.

@DerBurri DerBurri requested a review from a team as a code owner May 6, 2026 13:51
@DerBurri DerBurri changed the title feat feat(cli): Add ListOrganizations Feature May 6, 2026
DerBurri and others added 5 commits May 7, 2026 00:18
Signed-off-by: Maximilian <burr.maximilian97@gmail.com>
Signed-off-by: DerBurri <7892993+DerBurri@users.noreply.github.com>
Signed-off-by: Maximilian <burr.maximilian97@gmail.com>
Signed-off-by: Maximilian <burr.maximilian97@gmail.com>
Signed-off-by: Maximilian <burr.maximilian97@gmail.com>
Signed-off-by: Maximilian <burr.maximilian97@gmail.com>
@DerBurri DerBurri force-pushed the add-organization-functions branch from efa8db0 to 4551849 Compare May 6, 2026 22:18
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