1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/idtools/idtools_test.go
2020-02-11 00:06:42 +01:00

28 lines
441 B
Go

package idtools // import "github.com/docker/docker/pkg/idtools"
import (
"testing"
"gotest.tools/v3/assert"
)
func TestCreateIDMapOrder(t *testing.T) {
subidRanges := ranges{
{100000, 1000},
{1000, 1},
}
idMap := createIDMap(subidRanges)
assert.DeepEqual(t, idMap, []IDMap{
{
ContainerID: 0,
HostID: 100000,
Size: 1000,
},
{
ContainerID: 1000,
HostID: 1000,
Size: 1,
},
})
}