uuid_test.go 480 B

1234567891011121314151617181920212223
  1. package system
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/docker/docker/api/types/versions"
  6. "github.com/google/uuid"
  7. "gotest.tools/assert"
  8. "gotest.tools/skip"
  9. )
  10. func TestUUIDGeneration(t *testing.T) {
  11. skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "ID format changed")
  12. defer setupTest(t)()
  13. c := testEnv.APIClient()
  14. info, err := c.Info(context.Background())
  15. assert.NilError(t, err)
  16. _, err = uuid.Parse(info.ID)
  17. assert.NilError(t, err, info.ID)
  18. }