Skip to content

kasturinarra/glusterfs-containers-tests

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

=====
SETUP
=====

    - 1 Master
    - 3 Storage nodes
    - Passwordless ssh from the host (machine from where the tests would be
      run) to all the nodes in the cluster
    - Each node in the trusted storage pool should have 3 devices:
        - Device 1 (part of the topology)
        - Device 2 (part of the topology)
        - Device 3 (Additional device not part of the topology)


==============
PRE-REQUISITES
==============

The following steps have to be done on the host for a system-wide environment

    - Install glusto-tests libraries
        $ git clone http://review.gluster.org/glusto-tests
        $ cd glusto-tests/glustolibs-gluster
        $ python setup.py install

    - Install glustolibs-io libraries
        $ cd glusto-tests/glustolibs-io
        $ python setup.py install

    - Install glustolibs-misc libraries
        $ cd glusto-tests/glustolibs-misc
        $ python setup.py install

    - Clone the CNS automation repo
        $ git clone \
          ssh://<username>@code.engineering.redhat.com/cns-qe/cns-automation
        $ cd /cns-automation/cns-libs
        $ python setup.py install


Follow below steps to configure "tox" on the host to run tests in a virtual
environment

    - Install the following system packages
        $ yum install python-pip git gcc python-devel

    - Install 'tox' package first:
        $ pip install git+git://github.com/tox-dev/tox.git@2.9.1#egg=tox


==================
RUNNING TEST CASES
==================

Create a config file which lists out the OCP configurations like master and
storage node details, heketi related configurations, the type and number of
application pods, etc. Sample config file can be found under

    cns-automation/tests/cns_tests_sample_config.yml

To run test cases in a system-wide environment:

    glusto -c <config_file> '--pytest=-v -rsx <test_file_path_or_dir>'

    For example:

        glusto -c ../tests/cns-automation-config.yaml \
        '--pytest=-v -rsx ../tests -k test_dynamic_provisioning_p0_cases'

        glusto -c ../tests/cns-automation-config.yaml \
        '--pytest=-v -rsx ../tests -k test_volume_count_compare'

To run the test cases in venv using tox command:

    Run 'pep8' check for single file:

        $ tox -e pep8 <absolute_file_path>

    Run 'pep8' checks for all files:

        $ tox -e pep8

    Run 'functional' tests:

        $ tox -e functional -- glusto -c /path/to/config.yaml \
           --pytest='-v -rsx tests'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%