Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2376

Script unit testing & linting

      Goal: 

      1. Create unit tests for the pre-conversion analysis Python script that's embedded in the yaml file intended for the rhc-worker-script. For illustration here's the initial yaml+Python script https://gitlab.cee.redhat.com/insights-platform/advisor-backend/-/merge_requests/559.
      2. Set up a framework for executing the unit tests as well as executing a Python linter. This can be a script that digs the Python script out of the yaml file and executes the tests and linter on it.

      Acceptance Criteria:

      • The Python script that's to be executed by the rhc-worker-script has unit tests created
      • We have an easy way to run the unit tests on the Python script, at least manually
      • The Python script is statically analyzed

      Open questions:

      • Where do we store the unit tests for the python script?
      • Do we want to automate the testing on the GitLab CI side? Perhaps not for MVP but do that after MVP? Can it even be automated (depending on CI capabilities of GitLab)?

            awaltlov@redhat.com Andrea Waltlova
            mbocek@redhat.com Michal Bocek
            None
            None
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: