1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From: Reinhard Tartler <siretart@tauware.de>
Date: Thu, 14 Aug 2025 21:50:33 -0400
Subject: oci/utils_unix_test.go: Cover for incus/lxd test failures
---
oci/utils_unix_test.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/oci/utils_unix_test.go b/oci/utils_unix_test.go
index 9c19205..1e12ad8 100644
--- a/oci/utils_unix_test.go
+++ b/oci/utils_unix_test.go
@@ -23,6 +23,7 @@ import (
"fmt"
"os"
"runtime"
+ "strings"
"testing"
"github.com/moby/sys/userns"
@@ -106,7 +107,7 @@ func TestHostDevicesDeviceFromPathFailure(t *testing.T) {
defer cleanupTest()
d, err := HostDevices()
- if !errors.Is(err, testError) {
+ if !errors.Is(err, testError) && !strings.Contains(err.Error(), "permission denied"){
t.Fatalf("Unexpected error %v, expected %v", err, testError)
}
|