xeipuuv / gojsonschema

An implementation of JSON Schema, draft v4 v6 & v7 - Go language
2.57k stars 358 forks source link

TestFormats failed on Go1.17 #337

Open zhsj opened 3 years ago

zhsj commented 3 years ago
$ go test -v -run TestFormats
=== RUN   TestFormats
/tmp/t/gojsonschema/testdata/draft4/optional/format.json
    validation of date-time strings
    validation of URIs
    validation of e-mail addresses
    validation of IP addresses
    validation of IPv6 addresses
    validation of host names
/tmp/t/gojsonschema/testdata/draft6/optional/format.json
    validation of date-time strings
    validation of URIs
    validation of URI References
    format: uri-template
    validation of e-mail addresses
    validation of IP addresses
    validation of IPv6 addresses
    validation of host names
    validation of JSON-pointers (JSON String Representation)
/tmp/t/gojsonschema/testdata/draft7/optional/format/date-time.json
    validation of date-time strings
/tmp/t/gojsonschema/testdata/draft7/optional/format/date.json
    validation of date strings
/tmp/t/gojsonschema/testdata/draft7/optional/format/email.json
    validation of e-mail addresses
/tmp/t/gojsonschema/testdata/draft7/optional/format/hostname.json
    validation of host names
/tmp/t/gojsonschema/testdata/draft7/optional/format/idn-email.json
    validation of an internationalized e-mail addresses
/tmp/t/gojsonschema/testdata/draft7/optional/format/idn-hostname.json
    validation of internationalized host names
/tmp/t/gojsonschema/testdata/draft7/optional/format/ipv4.json
    validation of IP addresses
/tmp/t/gojsonschema/testdata/draft7/optional/format/ipv6.json
    validation of IPv6 addresses
/tmp/t/gojsonschema/testdata/draft7/optional/format/iri-reference.json
    validation of IRI References
/tmp/t/gojsonschema/testdata/draft7/optional/format/iri.json
    validation of IRIs
/tmp/t/gojsonschema/testdata/draft7/optional/format/json-pointer.json
    validation of JSON-pointers (JSON String Representation)
/tmp/t/gojsonschema/testdata/draft7/optional/format/regex.json
    validation of regular expressions
/tmp/t/gojsonschema/testdata/draft7/optional/format/relative-json-pointer.json
    validation of Relative JSON Pointers (RJP)
/tmp/t/gojsonschema/testdata/draft7/optional/format/time.json
    validation of time strings
    jsonschema_test.go:102: Test failed : /tmp/t/gojsonschema/testdata/draft7/optional/format/time.json
        validation of time strings.
        only RFC3339 not all of ISO 8601 are valid.
        expects: false, given true
        Schema: {"format":"time"}
        Data: "01:01:01,1111"
/tmp/t/gojsonschema/testdata/draft7/optional/format/uri-reference.json
    validation of URI References
/tmp/t/gojsonschema/testdata/draft7/optional/format/uri-template.json
    format: uri-template
/tmp/t/gojsonschema/testdata/draft7/optional/format/uri.json
    validation of URIs
--- FAIL: TestFormats (0.02s)
FAIL
exit status 1
FAIL    github.com/xeipuuv/gojsonschema 0.022s
zhsj commented 3 years ago

https://golang.org/doc/go1.17#time

The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.