• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codozor / fwkeeper / 19598121198
47%
main: 45%

Build:
Build:
LAST BUILD BRANCH: feat/error-classification-pod-lifecycle
DEFAULT BRANCH: main
Ran 22 Nov 2025 04:22PM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Nov 2025 04:21PM UTC coverage: 32.618% (+32.6%) from 0.0%
19598121198

Pull #7

github

SebastienLaurent-CF
✅ test: Add Phase 2 test coverage for locator implementations

Implement comprehensive test coverage for all locator implementations (pod, service, deployment, statefulset, daemonset) with mocked Kubernetes client. Refactor locator interfaces for better testability.

Architecture Changes:
- Create custom KubernetesClient interface hierarchy for cleaner abstraction:
  * KubernetesClient (CoreV1() + AppsV1())
  * CoreV1Client (Pods() + Services())
  * PodClient (Get() + List())
  * ServiceClient (Get())
  * AppsV1Client (Deployments() + StatefulSets() + DaemonSets())
  * ResourceClient (Get() returning interface{})
- Implement MockKubernetesClient supporting all resource types with helper methods
- Add adapters in runner.go to convert real kubernetes.Interface to custom interfaces
- Refactor locator implementations to use custom interfaces instead of kubernetes.Interface

Test Coverage (Phase 2):
- Pod locator (6 tests):
  * Pod found and running
  * Pod not found error handling
  * Pod not running states (pending, failed, succeeded, unknown)
- Service locator (3 tests):
  * Service found with running backing pod
  * Service not found error handling
  * No running pods for service error
- Resource locators (3 tests):
  * Deployment, StatefulSet, DaemonSet selector-based discovery
- Locator builder (16 tests):
  * Pod format routing (direct name)
  * Service formats: svc/, service/, services/
  * Deployment formats: dep/, deployment/, deployments/
  * StatefulSet formats: sts/, statefulset/, statefulsets/
  * DaemonSet formats: ds/, daemonset/, daemonsets/
  * Invalid format and too many slashes error handling

Files Added:
- internal/locator/mock_kubernetes.go - Complete mock client implementation (240+ lines)
- internal/locator/locator_test.go - Comprehensive locator tests (350+ lines)

Files Modified:
- internal/locator/locator.go - Define custom interfaces, refactor BuildLocator
- internal/locator/pod.go - Use KubernetesClient interface
- internal/lo... (continued)
Pull Request #7: ✅ test: Add Phase 1 test coverage for critical paths

153 of 215 new or added lines in 6 files covered. (71.16%)

119 existing lines in 4 files now uncovered.

319 of 978 relevant lines covered (32.62%)

0.36 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
80.65
80.65% internal/locator/locator.go
6
66.67
66.67% internal/locator/selector_based_locator.go
11
92.47
internal/locator/mock_kubernetes.go
41
0.0
0.0% internal/app/runner.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
66.67
66.67% internal/locator/service.go
6
80.65
80.65% internal/locator/locator.go
11
66.67
66.67% internal/locator/selector_based_locator.go
101
0.0
0.0% internal/app/runner.go
Jobs
ID Job ID Ran Files Coverage
1 19598121198.1 22 Nov 2025 04:22PM UTC 14
32.62
GitHub Action Run
Source Files on build 19598121198
  • Tree
  • List 14
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #7
  • PR Base - main (#19593418837)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc