Golang Test Validator Errors
Description
Running make test produces the following errors:
--- FAIL: TestValidator (0.01s)
validate_test.go:70: unknown domain for reference "../core.json#/definitions/uuid" (and 4 more errors)
validate_test.go:70: unknown domain for reference "../core.json#/definitions/uuid" (and 4 more errors)
validate_test.go:80: test failed for catalog_data, got true, want true error: <nil>
validate_test.go:70: unknown domain for reference "../core.json#/definitions/uuid" (and 4 more errors)
validate_test.go:80: test failed for models, got true, want true error: <nil>
Expected Behavior All tests passing.
@willcalcote, I think the error is coming because the schema for path design, catalog_data, and models is nil
@TomiwaAribisala-git , If there was an error in the loadSchema() function, then why the log message "error in loadSchema" is not appearing?
On tracking back the error, I got to know that jsonschema.Extract() written inside 'func JsonSchemaToCue(value string)(){}' of cue.go is producing error which is Error during jsonschema.Extract: unknown domain for reference "../core.json#/definitions/uuid" (and 4 more errors)
@willcalcote
It seems that core.json is expected at ../core.json, but the file is not present in the repository.
@willcalcote is this issue still accepting PRs ?
@willcalcote It seems that
core.jsonis expected at../core.json, but the file is not present in the repository.
This dir image if of imported library - github.com/meshery/schemas/constructs/v1beta1
core.json is at 2 dir's above design.json but the error is still there
--- FAIL: TestValidator (0.01s)
validate_test.go:69: unknown domain for reference "../../core.json" (and 5 more errors)
validate_test.go:69: unknown domain for reference "../../core.json" (and 5 more errors)
validate_test.go:77: test failed for catalog_data, got true, want true error: <nil>
validate_test.go:69: unknown domain for reference "../../core.json" (and 5 more errors)
validate_test.go:77: test failed for models, got true, want true error: <nil>
FAIL
FAIL github.com/layer5io/meshkit/validator 0.902s
FAIL