Skip to content

Test cache legacy migration coverage#33

Merged
ktsaou merged 1 commit into
mainfrom
quality-cache-legacy-coverage
Jun 4, 2026
Merged

Test cache legacy migration coverage#33
ktsaou merged 1 commit into
mainfrom
quality-cache-legacy-coverage

Conversation

@ktsaou

@ktsaou ktsaou commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Add behavior coverage for bash-era cache migration through LoadLegacy and LoadWithMigration.
  • Cover shell quoting, legacy field migration, malformed declarations, JSON-cache precedence, missing legacy fallback, and invalid legacy errors.
  • Keep production code unchanged.

Quality impact

  • pkg/cache coverage: 78.3% -> 88.8%.
  • Root coverage: 73.4% -> 73.8%.
  • Production large functions remain at 0.

Validation

  • go test ./pkg/cache
  • go test -count=1 -coverprofile=/tmp/update-ipsets-cache-slice29.cover -covermode=atomic ./pkg/cache
  • go run ./tools/archposture -root . > /tmp/update-ipsets-archposture-slice29.json
  • make lint
  • make staticcheck
  • make golangci-lint
  • CI=true make coverage
  • make test-strict
  • git diff --check

@ktsaou ktsaou enabled auto-merge June 4, 2026 06:38
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 50 complexity · 9 duplication

Metric Results
Complexity 50
Duplication 9

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@ktsaou ktsaou merged commit e797b6a into main Jun 4, 2026
13 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.

1 participant