Skip TestUUIDGeneration on API < v1.40

Older versions did not use an UUID as ID

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05bd9958f2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-04-19 20:10:06 +02:00
parent cedf201aef
commit a3b4e92d66
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -4,11 +4,14 @@ import (
"context"
"testing"
"github.com/docker/docker/api/types/versions"
"github.com/google/uuid"
"gotest.tools/assert"
"gotest.tools/skip"
)
func TestUUIDGeneration(t *testing.T) {
skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "ID format changed")
defer setupTest(t)()
c := testEnv.APIClient()
@ -16,5 +19,5 @@ func TestUUIDGeneration(t *testing.T) {
assert.NilError(t, err)
_, err = uuid.Parse(info.ID)
assert.NilError(t, err)
assert.NilError(t, err, info.ID)
}