meshery / meshkit

Common microservices framework for Meshery components
Apache License 2.0
112 stars 95 forks source link

Golang Test Validator Errors #576

Open willcalcote opened 3 months ago

willcalcote commented 3 months ago

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.

ShivanshuGupta07 commented 2 months ago

@willcalcote, I think the error is coming because the schema for path design, catalog_data, and models is nil

ShivanshuGupta07 commented 2 months ago

@TomiwaAribisala-git , If there was an error in the loadSchema() function, then why the log message "error in loadSchema" is not appearing?

ShivanshuGupta07 commented 2 months ago

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)

mainali123 commented 3 weeks ago

@willcalcote It seems that core.json is expected at ../core.json, but the file is not present in the repository.