Skip to content

Commit

Permalink
Skip TestUUIDGeneration on API < v1.40
Browse files Browse the repository at this point in the history
Older versions did not use an UUID as ID

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Apr 25, 2019
1 parent d080a86 commit 05bd995
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration/system/uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ 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()
info, err := c.Info(context.Background())
assert.NilError(t, err)

_, err = uuid.Parse(info.ID)
assert.NilError(t, err)
assert.NilError(t, err, info.ID)
}

0 comments on commit 05bd995

Please sign in to comment.