33 lines
898 B
Diff
33 lines
898 B
Diff
From 34f63b7d07c0a1c9a8986c896ebbdf6ae131629f Mon Sep 17 00:00:00 2001
|
|
From: Jamie Anderson <jamieand@amazon.com>
|
|
Date: Wed, 3 Mar 2021 17:45:43 +0000
|
|
Subject: [PATCH] Skip pkg/sysinfo tests that require root
|
|
|
|
Signed-off-by: Jamie Anderson <jamieand@amazon.com>
|
|
---
|
|
pkg/sysinfo/sysinfo_linux_test.go | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/pkg/sysinfo/sysinfo_linux_test.go b/pkg/sysinfo/sysinfo_linux_test.go
|
|
index aa557c9..ffb4b70 100644
|
|
--- a/pkg/sysinfo/sysinfo_linux_test.go
|
|
+++ b/pkg/sysinfo/sysinfo_linux_test.go
|
|
@@ -6,12 +6,14 @@ import (
|
|
"path"
|
|
"path/filepath"
|
|
"testing"
|
|
+ "github.com/docker/docker/testutil"
|
|
|
|
"golang.org/x/sys/unix"
|
|
"gotest.tools/v3/assert"
|
|
)
|
|
|
|
func TestReadProcBool(t *testing.T) {
|
|
+ testutil.RequiresRoot(t)
|
|
tmpDir, err := os.MkdirTemp("", "test-sysinfo-proc")
|
|
assert.NilError(t, err)
|
|
defer os.RemoveAll(tmpDir)
|
|
--
|
|
2.25.0.24.gbc7a3d4
|
|
|