浏览代码

Fix typo in idtools tests

It should check `os.Geteuid` with `uid` instead of `os.Getegid`.
On the container (where the tests run), the uid and gid seems to be
the same, thus this doesn't fail.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 7 年之前
父节点
当前提交
5d8b88b114
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/idtools/idtools_unix_test.go

+ 1 - 1
pkg/idtools/idtools_unix_test.go

@@ -284,7 +284,7 @@ func TestGetRootUIDGID(t *testing.T) {
 
 	uid, gid, err := GetRootUIDGID(uidMap, gidMap)
 	assert.Check(t, err)
-	assert.Check(t, is.Equal(os.Getegid(), uid))
+	assert.Check(t, is.Equal(os.Geteuid(), uid))
 	assert.Check(t, is.Equal(os.Getegid(), gid))
 
 	uidMapError := []IDMap{