From 9fbd772e8b64ff0c8c90bdfb86237aefa530a06c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 24 Jan 2025 17:08:36 +0100 Subject: pkg/vminfo: remove Context from the constructor The context is assumed to be passed into the function doing the actual processing. Refactor vminfo to follow this approach. This will help refactor pkg/rpcserver later. --- pkg/vminfo/linux_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/vminfo/linux_test.go') diff --git a/pkg/vminfo/linux_test.go b/pkg/vminfo/linux_test.go index 5be6a7a8d..3157e2b04 100644 --- a/pkg/vminfo/linux_test.go +++ b/pkg/vminfo/linux_test.go @@ -21,7 +21,7 @@ import ( func TestLinuxSyscalls(t *testing.T) { cfg := testConfig(t, targets.Linux, targets.AMD64) - checker := New(context.Background(), cfg) + checker := New(cfg) filesystems := []string{ // Without sysfs, the checks would also disable mount(). "", "sysfs", "ext4", "binder", "", @@ -40,7 +40,7 @@ func TestLinuxSyscalls(t *testing.T) { } stop := make(chan struct{}) go createSuccessfulResults(checker, stop) - enabled, disabled, features, err := checker.Run(files, allFeatures()) + enabled, disabled, features, err := checker.Run(context.Background(), files, allFeatures()) close(stop) if err != nil { t.Fatal(err) -- cgit mrf-deployment