test: coverage improvements, flaky fix, and dead test cleanup#250
Merged
Conversation
- 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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses 8 test improvement issues in a single PR:
Changes
Deleted
cli/src/internal/orchestrator/orchestrator_timeout_test.go: placeholder with only.SkipModified
cli/src/internal/azure/diagnostics_test.go: removed 3 dead test functions that were always skippedcli/src/cmd/app/commands/logs_follow_test.go: replaced alltime.Sleeppatterns with deterministic synchronizationcli/dashboard/vitest.config.ts: added coverage thresholdsCreated
cli/src/internal/service/graph_test.go: 12 table-driven tests for dependency graph operationscli/src/internal/service/parser_test.go: tests for FilterServices, HasServices, GetServiceProjectDircli/src/cmd/app/commands/service_control_test.go: tests for parseServiceList, isRunning, isStopped, newErrorResultcli/src/internal/dashboard/dashboard_test.go: tests for securityHeaders, serviceInfoPayload, loadAzureYaml, timeoutContextTesting
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)