Quellcode durchsuchen

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 vor 7 Jahren
Ursprung
Commit
5d8b88b114
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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)
 	uid, gid, err := GetRootUIDGID(uidMap, gidMap)
 	assert.Check(t, err)
 	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))
 	assert.Check(t, is.Equal(os.Getegid(), gid))
 
 
 	uidMapError := []IDMap{
 	uidMapError := []IDMap{