aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/direct_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-15 01:02:18 +0900
committerOphestra <cat@gensokyo.uk>2025-03-15 01:06:31 +0900
commitf9bf20a3c75d01cf597477231f9bbb61f15cd4fd (patch)
tree702c804f7715b53888ab77b497d216a9cf673f2e /helper/direct_test.go
parent73c1a830320636f91a0d15d6d247e88650e81df1 (diff)
helper: rearrange initialisation args
This improves consistency across two different helper implementations. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/direct_test.go')
-rw-r--r--helper/direct_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/helper/direct_test.go b/helper/direct_test.go
index 7af0e3a6..6431edec 100644
--- a/helper/direct_test.go
+++ b/helper/direct_test.go
@@ -12,7 +12,7 @@ import (
func TestDirect(t *testing.T) {
t.Run("start non-existent helper path", func(t *testing.T) {
- h := helper.NewDirect(context.Background(), argsWt, "/nonexistent", argF, nil, false)
+ h := helper.NewDirect(context.Background(), "/nonexistent", argsWt, false, argF, nil)
if err := h.Start(); !errors.Is(err, os.ErrNotExist) {
t.Errorf("Start: error = %v, wantErr %v",
@@ -21,7 +21,7 @@ func TestDirect(t *testing.T) {
})
t.Run("valid new helper nil check", func(t *testing.T) {
- if got := helper.NewDirect(context.TODO(), argsWt, "fortify", argF, nil, false); got == nil {
+ if got := helper.NewDirect(context.TODO(), "fortify", argsWt, false, argF, nil); got == nil {
t.Errorf("New(%q, %q) got nil",
argsWt, "fortify")
return
@@ -30,7 +30,7 @@ func TestDirect(t *testing.T) {
t.Run("implementation compliance", func(t *testing.T) {
testHelper(t, func(ctx context.Context, cmdF func(cmd *exec.Cmd), stat bool) helper.Helper {
- return helper.NewDirect(ctx, argsWt, "crash-test-dummy", argF, cmdF, stat)
+ return helper.NewDirect(ctx, "crash-test-dummy", argsWt, stat, argF, cmdF)
})
})
}