2019-02-28 19:07:10 -05:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
2019-04-19 14:10:06 -04:00
|
|
|
"github.com/docker/docker/api/types/versions"
|
2019-03-13 07:34:27 -04:00
|
|
|
"github.com/google/uuid"
|
2019-02-28 19:07:10 -05:00
|
|
|
"gotest.tools/assert"
|
2019-04-19 14:10:06 -04:00
|
|
|
"gotest.tools/skip"
|
2019-02-28 19:07:10 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestUUIDGeneration(t *testing.T) {
|
2019-04-19 14:10:06 -04:00
|
|
|
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "ID format changed")
|
2019-02-28 19:07:10 -05:00
|
|
|
defer setupTest(t)()
|
|
|
|
|
|
|
|
c := testEnv.APIClient()
|
|
|
|
info, err := c.Info(context.Background())
|
|
|
|
assert.NilError(t, err)
|
|
|
|
|
2019-03-13 07:34:27 -04:00
|
|
|
_, err = uuid.Parse(info.ID)
|
2019-04-19 14:10:06 -04:00
|
|
|
assert.NilError(t, err, info.ID)
|
2019-02-28 19:07:10 -05:00
|
|
|
}
|