Skip to content

test: coverage improvements, flaky fix, and dead test cleanup#250

Merged
jongio merged 1 commit into
mainfrom
patrol/test-improvements
May 18, 2026
Merged

test: coverage improvements, flaky fix, and dead test cleanup#250
jongio merged 1 commit into
mainfrom
patrol/test-improvements

Conversation

@jongio
Copy link
Copy Markdown
Owner

@jongio jongio commented May 18, 2026

Summary

Addresses 8 test improvement issues in a single PR:

Changes

Deleted

  • cli/src/internal/orchestrator/orchestrator_timeout_test.go: placeholder with only .Skip

Modified

  • cli/src/internal/azure/diagnostics_test.go: removed 3 dead test functions that were always skipped
  • cli/src/cmd/app/commands/logs_follow_test.go: replaced all time.Sleep patterns with deterministic synchronization
  • cli/dashboard/vitest.config.ts: added coverage thresholds

Created

  • cli/src/internal/service/graph_test.go: 12 table-driven tests for dependency graph operations
  • cli/src/internal/service/parser_test.go: tests for FilterServices, HasServices, GetServiceProjectDir
  • cli/src/cmd/app/commands/service_control_test.go: tests for parseServiceList, isRunning, isStopped, newErrorResult
  • cli/src/internal/dashboard/dashboard_test.go: tests for securityHeaders, serviceInfoPayload, loadAzureYaml, timeoutContext

Testing

All new and modified tests pass locally. The two pre-existing failures (TestRunFunctionApp_WithHostJson, TestContainerRuntimeDetection) are environment-dependent and unrelated to these changes.

Closes #186, #187, #206, #237, #238, #240, #241
Relates to #239 (already covered)

- Remove placeholder timeout test (#186)
- Remove dead diagnostics test scaffolding (#187)
- Add unit tests for graph.go and parser.go (#206)
- Add dashboard backend unit tests (#237)
- Add coverage thresholds to vitest config (#238)
- Add service lifecycle command tests (#240)
- Fix flaky time.Sleep-based test synchronization (#241)

Issue #239 (docker exec tests) is already addressed by the existing
comprehensive test suite in client_test.go.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.03%. Comparing base (8735f89) to head (016033f).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   57.06%   57.03%   -0.03%     
==========================================
  Files         158      156       -2     
  Lines       22736    22708      -28     
==========================================
- Hits        12974    12952      -22     
+ Misses       8963     8952      -11     
- Partials      799      804       +5     
Flag Coverage Δ
unittests 57.03% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jongio jongio merged commit ea834e1 into main May 18, 2026
11 of 16 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.

test(orchestrator): remove placeholder timeout test file

1 participant