mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Skip some tests requires root uid when run as user
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
5d8b88b114
commit
a7999aaa53
16 changed files with 75 additions and 33 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
"github.com/docker/docker/pkg/system"
|
||||
"github.com/gotestyourself/gotestyourself/assert"
|
||||
"github.com/gotestyourself/gotestyourself/skip"
|
||||
)
|
||||
|
||||
func max(x, y int) int {
|
||||
|
|
@ -480,6 +481,7 @@ func TestChangesSize(t *testing.T) {
|
|||
}
|
||||
|
||||
func checkChanges(expectedChanges, changes []Change, t *testing.T) {
|
||||
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
||||
sort.Sort(changesByPath(expectedChanges))
|
||||
sort.Sort(changesByPath(changes))
|
||||
for i := 0; i < max(len(changes), len(expectedChanges)); i++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue