Skip to content

test(home): cover the probe unit helpers (jobsManagerReady, machineCapacity, realSignIn, realRememberedClient) - #252

Merged
saadqbal merged 1 commit into
developfrom
test/home-probe-helpers
Jul 14, 2026
Merged

test(home): cover the probe unit helpers (jobsManagerReady, machineCapacity, realSignIn, realRememberedClient)#252
saadqbal merged 1 commit into
developfrom
test/home-probe-helpers

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

More of the coverage-audit "free batch" — existing fakes/config fixtures, no production changes.

  • jobsManagerReady (0%): prefixed+ready, zero-replicas, unprefixed legacy fallback, absent, nil-release.
  • machineCapacity (0%): Ready node → compute; node-list error → ok=false.
  • realSignIn (60%): the signed-in success return (email + first name).
  • realRememberedClient (0%): provisioned keys on the cached namespace; display name falls back to the client ID.

make ci green.

🤖 Generated with Claude Code


Note

Low Risk
Test-only additions with no runtime or production behavior changes.

Overview
Adds internal/cli/home_probe_helpers_test.go with unit tests for home-screen probe helpers in home.go, using fake Kubernetes clientsets and isolated config dirs via TRACEBLOC_CONFIG_DIR. No production code changes.

jobsManagerReady — prefixed deployment with ready replicas, zero replicas, legacy unprefixed jobs-manager, missing deployment, and nil release still checking the unprefixed name.

machineCapacity — a Ready node yields compute with ok=true; a failed node list returns ok=false.

realSignIn — empty config is not signed in; a saved profile with token returns email and first name.

realRememberedClient — provisioned when ActiveClientNamespace is set; display name from ActiveClientName or fallback to ActiveClientID; no namespace means not provisioned.

Reviewed by Cursor Bugbot for commit b931269. Bugbot is set up for automated code reviews on this repo. Configure here.

…apacity, realSignIn, realRememberedClient
More of the coverage-audit "free batch" (existing fakes/config fixtures, no
production changes):
- jobsManagerReady (0%): prefixed + ready, zero-replicas, unprefixed legacy
fallback, absent, nil-release.
- machineCapacity (0%): Ready node -> compute; node-list error -> ok=false.
- realSignIn (60%): the signed-in success return (email + first name).
- realRememberedClient (0%): provisioned keys on the cached namespace; the
display name falls back to the client ID.
make ci green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b931269. Configure here.

@LukasWodkaLukasWodka self-assigned this Jul 14, 2026

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 All four probe helpers check out — the jobsManagerReady prefixed/legacy/nil-release fallback and the namespace-gates-provisioned + name→ID fallback in realRememberedClient are the fiddly ones and they're pinned correctly.

@saadqbal
saadqbal merged commit c101771 into developJul 14, 2026
22 checks passed
@saadqbal
saadqbal deleted the test/home-probe-helpers branch July 14, 2026 08:50
Sign up for freeto 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.

2 participants

@LukasWodka@saadqbal