diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-13 23:15:34 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-13 23:34:15 +0900 |
| commit | fe7d208cf76fa6f24bb9d12ba29b5ed61d837ce3 (patch) | |
| tree | cac02af50a13b2078739a8f5a74d219f3b60833d /helper/direct_test.go | |
| parent | 60c287375048b21eab2bd82f1e7d43e36dcfb3a2 (diff) | |
helper: use generic extra files interface
This replaces the pipes object and integrates context into helper process lifecycle.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/direct_test.go')
| -rw-r--r-- | helper/direct_test.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/helper/direct_test.go b/helper/direct_test.go index 18323572..67b86827 100644 --- a/helper/direct_test.go +++ b/helper/direct_test.go @@ -1,6 +1,7 @@ package helper_test import ( + "context" "errors" "os" "testing" @@ -12,8 +13,8 @@ func TestDirect(t *testing.T) { t.Run("start non-existent helper path", func(t *testing.T) { h := helper.New(argsWt, "/nonexistent", argF) - if err := h.Start(); !errors.Is(err, os.ErrNotExist) { - t.Errorf("Start() error = %v, wantErr %v", + if err := h.Start(context.Background(), false); !errors.Is(err, os.ErrNotExist) { + t.Errorf("Start: error = %v, wantErr %v", err, os.ErrNotExist) } }) @@ -26,18 +27,6 @@ func TestDirect(t *testing.T) { } }) - t.Run("invalid new helper panic", func(t *testing.T) { - defer func() { - wantPanic := "attempted to create helper with invalid argument writer" - if r := recover(); r != wantPanic { - t.Errorf("New: panic = %q, want %q", - r, wantPanic) - } - }() - - helper.New(nil, "fortify", argF) - }) - t.Run("implementation compliance", func(t *testing.T) { testHelper(t, func() helper.Helper { return helper.New(argsWt, "crash-test-dummy", argF) }) }) |
