Improve YUM test coverage for ListInstalled, Clean, and GetPackageInfo methods
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- operating-systems
Research direction
Start with manager/yum and the fixture-based patterns in behavior_test.go, then review MockCommandRunner and the authentic outputs under testing/fixtures/yum/. Run go test ./manager/yum -cover first. Done means comprehensive behavior tests cover ListInstalled, Clean, and GetPackageInfo, pass in CI/CD, and maintain or improve overall YUM coverage.
Written by the indexing model from the issue text.
Description
Problem Statement
YUM package manager has 0% test coverage for three critical methods:
- ListInstalled() - Currently 0% coverage
- Clean() - Currently 0% coverage
- GetPackageInfo() - Currently 0% coverage
Current Test Coverage Status
From recent go test ./manager/yum -cover results:
- Overall YUM coverage: 69.4%
- Good coverage: enhancePackagesWithStatus (89.5%), Find (76.9%)
- Missing coverage: ListInstalled, Clean, GetPackageInfo (0% each)
Acceptance Criteria
- Add comprehensive tests for ListInstalled() method
- Add comprehensive tests for Clean() method
- Add comprehensive tests for GetPackageInfo() method
- Use existing fixture-based testing patterns
- Follow testing philosophy: focus on behavior and contracts
- Maintain or improve overall YUM test coverage percentage
- All new tests pass in CI/CD pipeline
Implementation Approach
- Use existing patterns: Follow established fixture-based testing in behavior_test.go
- Leverage CommandRunner mocking: Use MockCommandRunner for unit tests
- Real fixture data: Use authentic YUM command outputs from testing/fixtures/yum/
- Cross-platform testing: Ensure tests work in Docker environments
Test Strategy
- ListInstalled: Test parsing of yum list installed output with various package states
- Clean: Test cache cleanup operations and output parsing
- GetPackageInfo: Test detailed package information retrieval and parsing
Priority
High Priority - These are core YUM operations that need test coverage for reliability and maintainability.
Related Issues
- Part of overall test coverage improvement initiative
- Follows CommandRunner architecture established in Issue #20
- Uses patterns proven successful in APT package manager testing
- Dominant language
- Go
- Stars
- 17
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bluet/syspkg
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100