forked from gluster/glusterfs-containers-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
86 lines (58 loc) · 2.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
=====
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/[email protected]#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'