From 27f689959decd391b047c8034d481267d500549e Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 15 May 2025 15:01:02 +0200 Subject: vm: func Run accepts context It allows to use context as a single termination signal source. --- vm/vm_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vm/vm_test.go') diff --git a/vm/vm_test.go b/vm/vm_test.go index 34b656799..f550cc89a 100644 --- a/vm/vm_test.go +++ b/vm/vm_test.go @@ -5,6 +5,7 @@ package vm import ( "bytes" + "context" "fmt" "testing" "time" @@ -49,7 +50,7 @@ func (inst *testInstance) Forward(port int) (string, error) { return "", nil } -func (inst *testInstance) Run(timeout time.Duration, stop <-chan bool, command string) ( +func (inst *testInstance) Run(ctx context.Context, command string) ( outc <-chan []byte, errc <-chan error, err error) { return inst.outc, inst.errc, nil } @@ -395,7 +396,7 @@ func testMonitorExecution(t *testing.T, test *Test) { test.BodyExecuting(testInst.outc, testInst.errc, inject) done <- true }() - _, rep, err := inst.Run(time.Second, reporter, "", opts...) + _, rep, err := inst.Run(context.Background(), reporter, "", opts...) if err != nil { t.Fatal(err) } -- cgit mrf-deployment