Skip to content

test(e2e): Added coverage for pkg list#2677

Open
RupenderSinghRathore wants to merge 2 commits intounikraft:stagingfrom
RupenderSinghRathore:test/pkg_list_test
Open

test(e2e): Added coverage for pkg list#2677
RupenderSinghRathore wants to merge 2 commits intounikraft:stagingfrom
RupenderSinghRathore:test/pkg_list_test

Conversation

@RupenderSinghRathore
Copy link
Contributor

@RupenderSinghRathore RupenderSinghRathore commented Mar 3, 2026

Prerequisite checklist

Description of changes

Fixes #808

This PR adds comprehensive E2E tests for pkg list and improves existing tests for pkg info.
Key coverage:

  • Default behavior: Verified filtering for host architecture/platform.
  • Flag support: Added tests for --apps, --all, --arch, --plat, --help.
  • Environment Isolation: Verified --local and --remote behavior using isolated temporary configurations.
  • Refactored the test suite to use the update command to refresh the OCI catalog metadata. This allows for full E2E validation of the package registry without the overhead of pulling actual binaries.

Signed-off-by: kami-sama <kamisamakirishima@gmail.com>
Signed-off-by: kami-sama <kamisamakirishima@gmail.com>
@RupenderSinghRathore
Copy link
Contributor Author

RupenderSinghRathore commented Mar 3, 2026

While implementing these E2E tests, I encountered a few behaviors that I've temporarily skipped:

  1. Missing Types in OCI Catalog: I was unable to add automated tests for -M (Architectures), -C (Core), and -L (Libraries). These types do not appear in the default OCI catalog results in my environment, so I couldn't verify their filtering
  2. --limit Flag: I've skipped testing the limit functionality. After reviewing internal/cli/kraft/pkg/list/list.go, it appears the opts.Limit variable is defined but never actually implemented in the logic that processes the package slice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🧊 Icebox

Development

Successfully merging this pull request may close these issues.

Test kraft pkg ls

1 participant