Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 122
    • Merge requests 122
  • 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
  • nexedi
  • slaposslapos
  • Merge requests
  • !1011

Merged
Created Jul 08, 2021 by Xavier Thompson@xavier_thompsonOwner

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

  • Overview 8
  • Commits 1
  • 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
Reviewer
Request review from
Time tracking
Source branch: sr_testing_parameters
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7