Repository navigation
test(homelab): cover the join command's password sources and manual main-machine address - #604
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
zizmor is red for a reason outside this PR, and the fix needs a human push. Cause: upstream Fix: change the version comment to the exact tag, with no change to the SHA: (build.yml:142,182,222,297; reproducibility.yml:64; track-junctions.yml:45; unit-tests.yml:45) The agent could not push this because its GitHub App token lacks 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-opus-5.5 copilot=1.0.88 |
…trol plane nodePassphrase's credential fallback and attempt's HOMELAB_CONTROL_PLANE path are not reached by the homelab-cluster e2e scenario, which uses homelab.conf and mDNS. Test them against a loopback join server. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
205d269 to
02abe93
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
…test.go #591 adds cmd/bluefin-cluster/main_test.go with its own nodePassphrase cases, so this file moves to join_test.go and drops the three cases that duplicate them (conf beats credential, credential fallback, non-ASCII). Kept: the missing-passphrase error naming its sources and the manual-control-plane joins against a loopback join.Server. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary: Adds automated tests for the command that lets a machine join a Bluefin Server home cluster. They check two setup paths nothing tested before: reading the join password from a protected system file, and joining a main machine given by address. A mistake in either would otherwise only show up as a machine that silently fails to join.
Test Improvement
The weekly
homelab-clustere2e scenario always sets the passphrase inhomelab.confand finds the control plane over mDNS, so the credential fallback innodePassphraseand theHOMELAB_CONTROL_PLANEbranch ofattemptrun in no test. The package had no_test.go.New
cmd/bluefin-cluster/main_test.go(tempdirs and loopback only, no root):nodePassphrase: conf value wins over the credential and is normalised; falls back to$CREDENTIALS_DIRECTORY/bluefin-cluster.passphrase; the missing-passphrase error names the key, the conf path and the credential; non-ASCII refused.attemptwith a manual control plane against a realjoin.Serveron 127.0.0.1: success payload; wrong passphrase →join.ErrNotProvennaming the address; bad ports (0,65536,http) refused.Paths hardcoded under
/var/liband/run(controlPlanePassphrase,publish,writeIssue) are left alone: testing them needs a production change.Validation:
gofmt -lclean and the file type-checks withgo build;go testcannot run on the agent host, so the CIgojob (go test -race ./...) is the first execution.Fixes #603
Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-opus-5.5 copilot=1.0.88