mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9f0b3f5609
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
28 lines
441 B
Go
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,
|
|
},
|
|
})
|
|
}
|