Skip to content

Conversation

@padovan
Copy link
Contributor

@padovan padovan commented Jul 3, 2025

This PR adds comprehensive test coverage for all kci-dev results commands including summary, trees, boots, boot, tests, test, builds, and build commands. It covers command help validation, import testing, parameter validation, error handling, and end-to-end functionality with real KernelCI data.

Tests follow a consistent pattern for each command with help validation to ensure CLI documentation is complete, import verification to confirm internal functions are accessible, parameter testing to validate required inputs and error handling, and real data testing for end-to-end functionality with live KernelCI data.

padovan added 8 commits July 3, 2025 11:46
Add test coverage for the results trees command including:
- Help text validation with required options
- Function import and callability verification
- Command execution with default parameters

Tests verify the trees command functionality for listing kernel trees
from KCIDB origins with proper error handling for network/API issues.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add test coverage for the results summary command including:
- Help text validation with all required options
- Function import and callability verification
- History functionality testing with format_colored_summary edge cases
- JSON output format validation with real repository URLs

Tests cover both regular summary and --history modes, ensuring proper
functionality for displaying test result summaries and commit history data.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the boots command including:
- Help message validation and expected CLI options
- Import testing for internal functions and dependencies
- Status filter options validation
- JSON output format testing with network timeout handling

These tests ensure the boots command works correctly and handles
various input scenarios and output formats properly.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the boot command including:
- Help message validation and required CLI options (--id, --download-logs, --json)
- Import testing for internal functions (cmd_single_test, dashboard_fetch_test)
- ID parameter requirement validation
- Invalid ID handling with graceful error responses
- Real ID testing using boots command to get valid IDs for testing

The real ID test demonstrates end-to-end functionality by first
fetching boot results and then testing individual boot retrieval.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the tests command including:
- Help message validation with all expected CLI options
- Import testing for cmd_tests and dashboard_fetch_tests functions
- Filter options validation (start-date, end-date, compiler, config, compatible)
- JSON output format testing with network timeout handling

These tests ensure the tests command works correctly across
different filtering scenarios and output formats.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the test command including:
- Help message validation and required CLI options (--id, --download-logs, --json)
- Import testing for internal functions (cmd_single_test, dashboard_fetch_test)
- ID parameter requirement validation
- Invalid ID handling with graceful error responses
- Real ID testing using tests command to get valid test IDs

The real ID test demonstrates end-to-end functionality by first
fetching test results and then testing individual test retrieval.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the builds command including:
- Help message validation with all expected CLI options
- Import testing for cmd_builds and dashboard_fetch_builds functions
- Filter options validation (arch, tree, compiler, config, status)
- JSON output format testing with network timeout handling

These tests ensure the builds command works correctly across
different filtering scenarios and output formats.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Add comprehensive test coverage for the build command including:
- Help message validation and required CLI options (--id, --download-logs, --json)
- Import testing for internal functions (cmd_single_build, dashboard_fetch_build)
- ID parameter requirement validation
- Invalid ID handling with graceful error responses
- Real ID testing using builds command to get valid build IDs

The real ID test demonstrates end-to-end functionality by first
fetching build results and then testing individual build retrieval.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
@aliceinwire aliceinwire merged commit a422400 into kernelci:main Jul 4, 2025
5 checks 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.

2 participants