Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-1107

Write a schema for the json return data and use it to integration test the output

XMLWordPrintable

    • 3
    • 1.4 GA
    • Testable

      Now that we have a json report for the pre-assessment, we should test that the output is correct.  Other parties wishing to consume the assessment may want to use the schema to verify data or quickly examine what we expect the data to contain.

      The convert2rhel integration tests are already using the python jsonschema library so we should use that to write the schema.

      We may have several versions of the data and schema over time so we should do this in such a way that there can be multiple schemas.

      Here is a mockup of what the data should look like by the time we get to MVP: https://toshio.fedorapeople.org/convert2rhel/c2r-assessment-mockup.log

      Acceptance Criteria

      • A schema using the jsonschema spec https://json-schema.org/ for the json schema output.  It can live in a schemas subdirectory of the toplevel.  This schema will validate the fields and values of fields where they are not freeform which are returned in convert2rhel's pre-assessment report.
        • The filename should include the format version so multiple schemas can reside there.
      • An integration test that runs convert2rhel analyze, reads the json file, and then checks that the data validates against the schema.

              rolivier@redhat.com Rodolfo Olivieri
              tkuratom@redhat.com Toshio Kuratomi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: