Repository navigation
test: cover pure helpers, static GetHost and boxes client actions - #1219
Merged
Merged
Conversation
Unit tests for logic that needed no credentials, terminal or hypervisor and had none: ago/shortAgo buckets, stateStyle's paused mapping across provider spellings, attachHint naming the provider, per-task WIP refs, the Claude token path, localClaudeTheme tolerating a bad ~/.claude.json, checkCloudProvider's credential auto-detect, remoteForVM for imported hosts, ProviderStatic.GetHost, and the boxes client's Pause/Resume/ Destroy/SetIdleTTL/ListImages/ListSizes routes. cmd 46.2% -> 47.9%, pkg/cloud 51.5% -> 51.8%, providerboxes 64.6% -> 74.6%. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1219 +/- ##
==========================================
+ Coverage 45.70% 46.72% +1.02%
==========================================
Files 75 75
Lines 8783 8783
==========================================
+ Hits 4014 4104 +90
+ Misses 4769 4679 -90 ☔ View full report in Codecov by Harness. 🚀 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.
What
Unit tests for logic that needed no credentials, terminal or hypervisor and had no coverage. No production code changes.
ago/shortAgotime buckets;stateStylemapping every provider's stopped spelling to paused-yellow;attachHintnaming the provider unless on boxes; per-task WIP refs;claudeTokenPath;localClaudeThemetolerating a missing or malformed~/.claude.json;checkCloudProviderauto-detecting from credentials and exportingONCTL_CLOUD;remoteForVMfor static hosts (inventory user/port/key win over defaults, an explicit port flag wins over inventory, unknown host is an error).GetHostreturns the imported host verbatim and errors for an unknown name.Pause/Resume/Destroy/SetIdleTTL/ListImages/ListSizeshit the right method and route with the box name escaped;SetIdleTTLsends seconds.Each test's comment states why the behaviour matters, so it fails if the intent changes, not just the implementation.
Skipped on purpose
The remaining zero-coverage code is cloud SDK client constructors, interactive prompts, ssh/tmux sessions and VMM process managers, which need credentials, a terminal or a hypervisor.
🤖 Generated with Claude Code