{"id":25000617,"url":"https://github.com/gluster/glusterfs-containers-tests","last_synced_at":"2025-04-12T08:52:34.112Z","repository":{"id":44935310,"uuid":"159278245","full_name":"gluster/glusterfs-containers-tests","owner":"gluster","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-17T16:47:58.000Z","size":1533,"stargazers_count":6,"open_issues_count":1,"forks_count":18,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T08:52:30.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gluster.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-27T04:56:26.000Z","updated_at":"2021-11-25T14:04:59.000Z","dependencies_parsed_at":"2022-08-29T08:41:15.971Z","dependency_job_id":null,"html_url":"https://github.com/gluster/glusterfs-containers-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/gluster%2Fglusterfs-containers-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fglusterfs-containers-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fglusterfs-containers-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fglusterfs-containers-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluster","download_url":"https://codeload.github.com/gluster/glusterfs-containers-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543883,"owners_count":21121838,"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":[],"created_at":"2025-02-04T19:36:19.560Z","updated_at":"2025-04-12T08:52:34.094Z","avatar_url":"https://github.com/gluster.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#######################\nOpenshift Storage Tests\n#######################\n\nThis repo contains `test cases` and `functions` for `storage` on OpenShift. The\nfunctions can be installed as python package and used in any other python\nproject.\n\n***************\nGetting started\n***************\n\nPrerequisites\n*************\n\nCreate setup with below system requirements and install required packages on\nhost from which this repo is used as library or tests are executed.\n\nMinimum System Requirements\n===================\n\n* 1 Master node\n* 3 Storage nodes\n* Passwordless ssh from the host (machine from where the tests would be run)\n  to all the nodes in the cluster\n* Each node in the trusted storage pool should have 2 mandatory and 1 optional\n  devices\n\n    #. Device 1 (part of the topology)\n    #. Device 2 (part of the topology)\n    #. Device 3 (Optional additional device not part of the topology)\n\nRecommended System Requirements\n====================\n\n* 1 Master node\n* 1 Compute node (for node addition and removal tests)\n* 3 Infra node (recommended by openshift)\n* 3 Storage nodes\n* 3 Registry storage nodes (for logging, metrics and monitoring tests)\n* Passwordless ssh from the host (machine from where the tests would be run)\n  to all the nodes in the cluster\n* Each node in the trusted storage pool should have 2 mandatory and 1 optional\n  devices\n\n    #. Device 1 (part of the topology)\n    #. Device 2 (part of the topology)\n    #. Device 3 (Optional additional device not part of the topology)\n\nInstalling `tox` on host\n========================\n\n`tox` aims to automate and standardize testing in Python. It is generic\n`virtualenv` management and test command line tool you can use for\n\n* Checking your package installs correctly with different Python versions and\n  interpreters\n* Running your tests in each of the environments, configuring your test tool of\n  choice\n* Acting as frontend to Continuous integration servers, greatly reducing\n  boilerplates and merging CI and shell-based testing\n\nRefer `tox doc \u003chttps://tox.readthedocs.io/en/latest/#\u003e`__ for more\ninformation.\n\nBelow are the instructions to install `tox` on host\n\n* Install below system packages\n\n    .. code-block::\n\n        $ yum install python-pip git gcc python-devel\n\n* Install `tox` package\n\n    .. code-block::\n\n        $ pip install git+git://github.com/tox-dev/tox.git@2.9.1#egg=tox\n\nExecuting the test cases\n************************\n\n* Create a config file which lists out the OCP configurations like master and\n  storage node details, heketi related configurations etc. Sample config file\n  can be found under `tests` directory\n\n    .. code-block::\n\n        $ tests/glusterfs-containers-tests-config.yaml\n\n* To run test cases in a virtual environment using py2:\n\n    .. code-block::\n\n        $ tox -e functional -- glusto -c \u003cconfig_file\u003e \\\n            '--pytest=-v -rsx \u003ctest_file_path_or_dir\u003e'\n\n    For example:\n        * Execute single test case from test class file\n\n        .. code-block::\n\n            $ tox -e functional -- glusto -c \\\n                tests/glusterfs-containers-tests-config.yaml \\\n                '--pytest=-v -rsx \\\n                tests/functional/arbiter/test_arbiter.py \\\n                -k test_arbiter_pvc_create'\n\n        * Execute all test cases from test class file\n\n        .. code-block::\n\n            $ tox -e functional -- glusto -c \\\n                tests/glusterfs-containers-tests-config.yaml \\\n                '--pytest=-v -rsx\n                tests/functional/arbiter/test_arbiter.py'\n\n        * Execute all test cases from test directory\n\n        .. code-block::\n\n            $ tox -e functional -- glusto -c \\\n                tests/glusterfs-containers-tests-config.yaml \\\n                '--pytest=-v -rsx tests'\n\n* To run test cases in a virtual environment using py3:\n\n    .. code-block::\n\n        $ python3 -m tox -e functional3 -- glusto -c \u003cconfig_file\u003e \\\n            '--pytest=-v -rsx \u003ctest_file_path_or_dir\u003e'\n\n  Note, that \"tox\" and other python packages should be installed\n  using pip3 - separate package installer than the one used for py2 (pip).\n\nWriting tests in `glusterfs-containers-tests`\n*********************************************\n\n`tests` directory in `glusterfs-containers-tests` contains test cases. One\nmight want to create a directory with feature name as the name of test\ndirectory under tests to add new test cases.\n\nSimilar to `glusto-tests \u003chttps://github.com/gluster/glusto-tests\u003e`__, test\ncases in `glusterfs-containers-tests` can be written using standard `PyUnit`,\n`PyTest` or `Nose` methodologies as supported by `glusto` framework.\n\nOne can follow the `PyUnit \u003chttp://glusto.readthedocs.io/en/latest/userguide/\nunittest.html\u003e`__ docs to write `PyUnit` tests, or `PyTest \u003chttp://glusto.\nreadthedocs.io/en/latest/userguide/pytest.html\u003e`__ docs to write `PyTest`\ntests, or `Nose \u003chttp://glusto.readthedocs.io/en/latest/userguide/\nnosetests.html\u003e`__ docs to write `Nose` tests.\n\nFor more information on how to write test cases, refer `developing-guide\n\u003chttps://github.com/gluster/glusto-tests/blob/master/docs/userguide/developer\n-guide.rst\u003e`__.\n\nValidating `PEP 8` rules after adding new code\n**********************************************\n\nRefer `PEP 8 -- Style Guide for Python Code \u003chttps://www.python.org/dev/peps/\npep-0008/\u003e`__ for more information on `PEP 8` rules.\n\n* Run `PEP 8` checks for all files\n\n    .. code-block::\n\n        $ tox -e pep8\n\n* Run `PEP 8` check for single file\n\n    .. code-block::\n\n        $ tox -e pep8 \u003cabsolute_or_relative_file_path\u003e\n\n       For Example:\n\n        .. code-block::\n\n             $ tox -e pep8 tests/functional/test_heketi_restart.py\n\nLogging\n*******\n\nLog `file name` and log `level` can be passed as argument to `glusto` command\nwhile running the `glusto-tests`.\n\nFor example:\n\n    .. code-block::\n\n        $ tox -e functional -- glusto -c 'config.yml' \\\n            -l /tmp/glustotests-ocp.log --log-level DEBUG \\\n            '--pytest=-v -x tests -m ocp'\n\nOne can configure log files, log levels in the test cases as well. For details\non how to use `glusto` framework for configuring logs in tests, refer `docs\n\u003chttp://glusto.readthedocs.io/en/latest/userguide/loggable.html\u003e`__\n\nDefault log location is `/tmp/glustomain.log`\n\n.. Note::\n\n    When using `glusto` via the `Python Interactive Interpreter`, the default\n    log location is `/tmp/glustomain.log`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fglusterfs-containers-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluster%2Fglusterfs-containers-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fglusterfs-containers-tests/lists"}