Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1011

slapos-sr-testing: Add instance parameters to filter what is tested

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Xavier Thompson requested to merge xavier_thompson/slapos:sr_testing_parameters into master Jul 08, 2021
  • Overview 8
  • Commits 1
  • Pipelines 0
  • Changes 2

Introduce parameters to choose which SRs are tested and what arguments are passed to python -m unittest:

  • only-sr: a list of software releases names to test
  • unittest-args: a list of arguments for unittest

The default behavior (when neither only-sr nor unittest-args is given) is the same as before:

  • all the SRs are tested
  • the test command is python -m unittest discover -v, which runs all the tests in all the modules of the form test*.py

But now we can do things like:

{
  "only-sr": "theia",
  "unittest-args": "test.TestTheia.test_http_get"
}

which will only launch python -m unittest test.TestTheia.test_http_get in the theia SR.

Such parameters can be specified via the Slapos Parameters field of a test suite.

Several SRs can be specified using a list of strings instead of a single string, and the same for several arguments.

For example: "unittest-args": ["-v", "test.TestTheia.test_http_get"]

This is a spin-off from Theia Resiliency MR https://lab.nexedi.com/nexedi/slapos/merge_requests/931, where it was introduced to provide a convenient way to launch ERP5-in-Theia resiliency tests separately from other tests. See this comment for more details.

Edited Jul 08, 2021 by Xavier Thompson
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: sr_testing_parameters
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7