- Use Task Scheduler XML instead of /TR - Run -ensure agent in-process, not child - Add console close and panic protection - Guard nil event channels after stop - Add non-Windows stubs for startup/mutex
16 lines
353 B
Go
16 lines
353 B
Go
package instance
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestFilterArgsDropsLauncherFlags(t *testing.T) {
|
|
t.Parallel()
|
|
got := filterArgs([]string{"-ensure", "-background", "-foreground", "-addr", "0.0.0.0:5033"})
|
|
want := []string{"-addr", "0.0.0.0:5033"}
|
|
if !reflect.DeepEqual(got, want) {
|
|
t.Fatalf("filterArgs() = %#v, want %#v", got, want)
|
|
}
|
|
}
|