Skip to content

Commit

Permalink
Merge pull request #1780 from mvo5/skip-driver-tests-on-eperm
Browse files Browse the repository at this point in the history
graphtest: skip tests on insufficient permissions
  • Loading branch information
openshift-merge-bot[bot] committed Jan 5, 2024
2 parents c33ab9a + bfe5035 commit 7ca28f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/graphtest/graphtest_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func newDriver(t testing.TB, name string, options []string) *Driver {
if errors.Is(err, graphdriver.ErrNotSupported) || errors.Is(err, graphdriver.ErrPrerequisites) || errors.Is(err, graphdriver.ErrIncompatibleFS) {
t.Skipf("Driver %s not supported", name)
}
var unixErr unix.Errno
if errors.As(err, &unixErr) && unixErr == unix.EPERM {
t.Skipf("Insufficient permission to test %s", name)
}
t.Fatal(err)
}
return &Driver{d, root, runroot, 1}
Expand Down

0 comments on commit 7ca28f6

Please sign in to comment.