{"id":21051325,"url":"https://github.com/ovirt/ovirt-system-tests","last_synced_at":"2025-05-15T21:35:24.711Z","repository":{"id":37602237,"uuid":"60158889","full_name":"oVirt/ovirt-system-tests","owner":"oVirt","description":"This repository includes automated tests executed on the whole oVirt distribution","archived":false,"fork":false,"pushed_at":"2025-02-21T15:01:56.000Z","size":5015,"stargazers_count":14,"open_issues_count":9,"forks_count":48,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-03T15:43:55.159Z","etag":null,"topics":["ovirt","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oVirt.png","metadata":{"files":{"readme":".github/README_AUTOMATION.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-01T08:25:33.000Z","updated_at":"2024-12-17T14:46:20.000Z","dependencies_parsed_at":"2023-02-16T21:30:45.197Z","dependency_job_id":"2c02bb27-a70a-4070-9751-2b7fbeeaf539","html_url":"https://github.com/oVirt/ovirt-system-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oVirt%2Fovirt-system-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oVirt%2Fovirt-system-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oVirt%2Fovirt-system-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oVirt%2Fovirt-system-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oVirt","download_url":"https://codeload.github.com/oVirt/ovirt-system-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254425677,"owners_count":22069219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ovirt","testing"],"created_at":"2024-11-19T15:52:33.354Z","updated_at":"2025-05-15T21:35:19.697Z","avatar_url":"https://github.com/oVirt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oVirt System Tests\n\n[![Read the Docs]( https://readthedocs.org/projects/ovirt-system-tests/badge/?version=latest)](https://ovirt-system-tests.readthedocs.io/en/latest/)\n\nWelcome to the oVirt System Tests source repository.\n\nThis repository is hosted on [GitHub:ovirt-system-tests](https://github.com/oVirt/ovirt-system-tests)\n\n## System requirements\n\n### Operating System\n\nCurrently OST can run on RHEL or CentOS Stream at least roughly matching the version used by oVirt or RHV.\nLatest CentOS Stream or RHEL 8 or 9 should work.\n\n### Disk Space\n\nost-images packages that contain the preinstalled images are fairly large, make sure you have enough disk space,\n15 GB per each distro variant in /usr/share. Additional space is needed for actual suite run,\nanother 5GB at least in the directory where you run tests from.\n\n### Memory\n\nThe memory requirements are derived from the VM specs you'll have in the test suite, it is recommended that the host you're using will have at\nleast 16GB of RAM, though basic suite still runs with 8GB.\n\n### Permissions\n\nThe user account used to run OST should belong to the groups qemu and libvirt. setup_for_ost.sh does that for you.\n\n## How to contribute\n\n### Submitting patches\n\nPatches are welcome!\n\nPlease submit patches to [GitHub:ovirt-system-tests](https://github.com/oVirt/ovirt-system-tests).\nIf you are not familiar with the review process for GitHub patches you can read about [Working with oVirt GitHub](https://ovirt.org/develop/dev-process/working-with-github.html)\non the [oVirt](https://ovirt.org/) website.\n\n### Found a bug or documentation issue?\n\nTo submit a bug, suggest an enhancement or report a documentation issue for oVirt System Tests please\njoin [oVirt Development forum / mailing list](https://lists.ovirt.org/admin/lists/devel.ovirt.org/) and discuss there.\n\n## Still need help?\n\nIf you have any other questions, please join [oVirt Development forum / mailing list](https://lists.ovirt.org/admin/lists/devel.ovirt.org/) and ask there.\n\n## Running the tests\n\nMake sure your machine is set up with `setup_for_ost.sh`\nYou can use `ost.sh` for running the complete suite on a concrete ost-images distro\nE.g. `./ost.sh run basic-suite-master el8stream`\n\nYou can use `--custom-repo` for verifying an oVirt patch:\n\n* On your GitHub account go to Settings/Developer settings/Personal access tokens/Generate new token, and give it the **repo** scopes.\n* On your ost machine run `export GITHUB_TOKEN=personal_access_token`\n* Run the tests, e.g `./ost.sh run basic-suite-master el8stream --custom-repo=https://github.com/oVirt/ovirt-engine/pull/pr_number`\nYou can pass this option multiple times to test more than 1 build at once.\n\nThe environment is left running after it finishes so that you can examine or further use the created environment.\nIt is necessary to clean the environment up aftery every run with `./ost.sh destroy`.\nIt is possible to prevent accidental destroying with `./ost.sh lock Some reason`. If done, `destroy` fails with a message.\nThe environment contains inventory, VMs, live VM logs and is normally stored\nin `deployment` subdirectory of the repository. The location can be changed\nthrough `OST_DEPLOYMENT` environment variable.\n\nWhen the environment is up you can use `./ost.sh shell` to connect to the VMs.\n`./ost.sh status` shows a little overview of how the OST environment is laid out on the host system.\n\n## Advanced use\n\n`ost.sh` internally uses bash functions from `lagofy.sh` that you can source into your (bash only, other shells are not supported) environment\nand use for more granular control.\nFunctions starting with `ost_` and `OST_` variables can be used to bring up the VMs with custom images, boot OST environment without running tests,\nor to run individual test cases.\n\nYou can also access the web ui easily, locate the engine's IP address in `./ost.sh status`. In case of Hosted Engine-based suites where\nthe engine VM is not declared in OST you can inspect the DNS entries of management network by `virsh net-dumpxml`.\nOnce you've located the engine VM's IP, add it to `/etc/hosts`. You have to use **the exact FQDN** (for basic suite you can also use just `engine`)\nNow, log in to the web-UI at:\n\n* URL: `https://engine/ovirt-engine/webadmin/`\n* Username: `admin` or `admin@ovirt` if keycloak is enabled\n* Password: `123456`\n* Profile: `internal`\n\nIf you're running OST on a remote machine, you can tunnel a local\nport directly to the destination machine - from your local machine:\n\n```console\n    $ sudo ssh -L 443:192.168.200.2:443 USER@HOST_RUNNING_OST\n            ----  =================      ~~~~~~~~~~~~~~~~\n            (*)   (**)                       (***)\n\n    (*)   - The port on the local machine that the tunnel will be available at.\n    (**)  - The machine IP, visible from the *host running OST* . This is were the traffic is tunneled to.\n            Usually 192.168.200.2 is the address of ovirt-engine, but you can check that with ./ost.sh status\n    (***) - The host running OST which can reach the VMs network and will tunnel the connection.\n```\n\n### Running specific tests\n\nIt's often useful to run just a single test, usually after running a suite, to test something using the existing machines.\nFollowing is an example showing how to run the he-basic-suite, and after it's finished, run again one of the tests.\n\nFirst, run the suite:\n\n```console\n./ost.sh run he-basic-suite-master el8stream\n```\n\nNow, you might change the code, e.g. to run a test with some change in it, or a new test you are developing. Then, run it:\n\n```console\n. lagofy.sh\nost_init he-basic-suite-master\nost_run_tc he-basic-suite-master/test-scenarios/test_030_ovirt_auth.py\n```\n\nThe first argument to `ost_run_tc` is the test to run - a module, or a method/class inside one, e.g.:\n\n```console\nost_run_tc basic-suite-master/test-scenarios/test_004_basic_sanity.py::test_vdsm_recovery\n```\n\nAn optional second argument is passed as `-k` to pytest, for selecting tests based on pattern,\ne.g. this will run `test_010_local_maintenance_cli.py` and `test_012_local_maintenance_sdk.py`:\n\n```console\nost_run_tc he-basic-suite-master/test-scenarios local_maintenance\n```\n\nand this will run `test_add_hosts` and `test_verify_add_hosts`:\n\n```console\nost_run_tc basic-suite-master/test-scenarios/test_002_bootstrap.py add_hosts\n```\n\nSee the [pytest documentation](https://docs.pytest.org/en/stable/usage.html#specifying-tests-selecting-tests) for details.\n\nPlease note, that these are ran in a separate pytest session, and that several of our tests depend on previous ones to pass,\nand/or on a specific state of the test VMs.\n\n## Development\n\nMake sure your machine is set up with `setup_for_ost.sh`\nOST is designed to run concurrently under single non-root user, but in separate checkouts.\nAt runtime it creates \"deployment\" and \"exported-artifacts\" directories in the workspace.\n\nMake sure that your new code doesn't depend on anything on the OST host,\nwhenever you need something it's usually a better idea to run that inside one of the VMs.\n\n## Running tox tests\n\nFor developers of OST, a quick flake8 and pylint runs are available to identify any\nsyntax errors, typos, unused import etc.\n\nTo run the flake8/pylint, you'll need to have tox installed. To run pylint\nwithout import errors you should also have ovirtdsk4 and ansible-runner installed.\n\nRunning linting tests:\n\n```console\ntox -e flake8,pylint,black,broken-symlinks\n```\n\nor `ost_linters` lagofy function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovirt%2Fovirt-system-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovirt%2Fovirt-system-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovirt%2Fovirt-system-tests/lists"}