summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Delete 'test_add_device_heketi_cli' tc as duplicateValerii Ponomarov2018-12-271-105/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current 'test_add_device_heketi_cli' [CNS-877] tc completely duplicates another existing tc - 'test_device_remove_operation' [CNS-766]. Being, on it's turn, very fragile and requiring refactor. So, remove this test as it makes no sense neither to keep it skipped nor to refactor it. Change-Id: I40cf7b3d015d1345f0ac2a89569dd64cd67711d3
* | | Merge "Fix CNS-797 and CNS-798 test cases"Valerii Ponomarov2019-01-021-4/+22
|\ \ \ | |/ / |/| |
| * | Fix CNS-797 and CNS-798 test casesValerii Ponomarov2018-12-261-4/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | In some rare cases we get following error trying to create distributed volume: - Insufficient suitable allocatable extents for logical volume tp_foo: 25344 more required. So, fix such situation by catching exception with such message and retrying with smaller volume size. Change-Id: I015a4547347858cd8aff9e566e3dc662a94b6b83
* / Refactor config optionsValerii Ponomarov2018-12-259-93/+76
|/ | | | | | | | | | | | | | | | | | | Doing following: - Rename top-level config option group called 'cns' to the 'openshift'. - Rename 'cns.setup.cns_project_name' option to the 'openshift.storage_project_name'. - Rename 'scale' option to the 'openshift.scale'. - Delete ''devices' and 'zone' options from 'gluster_servers' config group. - Delete 'cns.setup.cnd_username' option as unneeded. - Delete 'cns.setup.cnd_password' option as unneeded. - Delete 'oc_login' common function as unneeded after deletion of 'cns.setup.cnd_username' and 'cns.setup.cnd_password' options. - Remove 'Cns' word from base classes. - Keep backwards compatibility for old options to make transition be smooth. Change-Id: I04ddbbad5f64ffeac79a6744480d33a263d63001
* Add abstraction between deployment types and gluster commandsValerii Ponomarov2018-12-257-152/+50
| | | | | | | | | | | | | | | | | | | | | | | | Now, it is possible to run glustolibs commands on both deployment types: containerized and standalone. It is possible using 'auto_get_gluster_endpoint' as target for lib function in addition to the '@podcmd.GlustoPod()' decorator. Example: """ from glustolibs.gluster.volume_ops import get_volume_list from cnslibs.common import heketi_libs from cnslibs.common import podcmd class TestExample(heketi_libs.HeketiBaseClass): @podcmd.GlustoPod() def test_get_vol_list_either_on_node_or_on_pod(self): volumes = get_volume_list('auto_get_gluster_endpoint') """ Also, delete all the current usages of 'deployment_type' config option, and delete the option as unneeded anymore. Change-Id: I281f287c432a5a9efefda588be436ee285188697
* Merge "Fix 'test_volume_expansion_no_free_space' test case"Valerii Ponomarov2018-12-211-121/+93
|\
| * Fix 'test_volume_expansion_no_free_space' test caseValerii Ponomarov2018-12-191-121/+93
| | | | | | | | | | | | | | This test is broken in several places. So, fix it and also remove redundant steps. Change-Id: I7a9f2c077dda35a8a477fa27882cddf79ec69ac5
* | Merge "changing test function name"Valerii Ponomarov2018-12-211-1/+2
|\ \
| * | changing test function namenigoyal2018-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | | The function name was confusing because now we are verifying functionality of node tags and device tags. So changing the name Change-Id: I00a2a12cc8b74e5bf9b76018698738550ea0c613
* | | Merge "Cleanup heketi config options"Valerii Ponomarov2018-12-213-37/+26
|\ \ \
| * | | Cleanup heketi config optionsValerii Ponomarov2018-12-193-37/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing several unused options and replacing couple of them with built-in values. Change-Id: I458f0eae6a68ddcb2711d454c81cdcee8142673a
* | | | Merge "Fix bug in 'test_volume_creation_no_free_devices' test case"Valerii Ponomarov2018-12-211-5/+4
|\ \ \ \ | |_|/ / |/| | |
| * | | Fix bug in 'test_volume_creation_no_free_devices' test caseValerii Ponomarov2018-12-191-5/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Which uses improper vars in block of code where we disable redundant nodes. It is just not executed in case we use 3-node Gluster cluster. So, fix var usages making this test be compatible with 4+ node GLuster clusters. Change-Id: Id9ac9ae9b614c492c0f39573c0224378f887fee5
* | | Merge "[CNS-1523][CNS-1524] arbiter expand test case"Valerii Ponomarov2018-12-201-0/+81
|\ \ \ | |/ / |/| |
| * | [CNS-1523][CNS-1524] arbiter expand test casenigoyal2018-12-201-0/+81
| | | | | | | | | | | | | | | | | | | | | this test case is verifying that arbiter pvc expand is working properly when tags are set on nodes and devices Change-Id: I7118e5dd94856e36cdfa438f159a39604c50e7c0
* | | Merge "Add 'openshift_version.py' module"Valerii Ponomarov2018-12-191-3/+2
|\ \ \
| * | | Add 'openshift_version.py' moduleValerii Ponomarov2018-12-171-3/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With growth of amount of test cases and supported OpenShift versions we need to perform more and more version comparisons. So, this module is designed to ease such operations. Usage example: from cnslibs.common import openshift_version version = openshift_version.get_openshift_version() if '3.9' < version <= '3.11': # Do stuff for OpenShift 3.11 or 3.10 elif version <= '3.9': # Do stuff for OpenShift 3.9 or lower else: # Do stuff for higher versions than 3.11 Also, reuse it in all the existing places with version comparisons. Change-Id: Ibc27eff20ed0dff80deca73d5d156e23bda57439
* / | [CNS-451]: Test to verify volumes post node rebootSaravanakumar Arumugam2018-12-191-0/+150
|/ / | | | | | | | | | | Change-Id: I2fc6f2ee9dd0c38519ab560e9d1c1a9672940843 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Signed-off-by: vamahaja <vamahaja@redhat.com>
* | Merge "Make 'test_storage_class_cases' module support standalone Gluster"Valerii Ponomarov2018-12-171-3/+3
|\ \
| * | Make 'test_storage_class_cases' module support standalone GlusterValerii Ponomarov2018-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By doing following updates: - Add and reuse lib function which calculates amount of Gluster PODs or Gluster nodes. - Make 'get_gluster_blockvol_info_by_pvc_name' lib func support standalonge Gluster clusters in addition to the 'containerized' ones. Change-Id: I6a12bb4c30b1e6f8698a614abefc248149773302
* | | Add test case CNS-766: Test device removal functionalityValerii Ponomarov2018-12-172-245/+287
| | | | | | | | | | | | Change-Id: I7d05c73f468634300ad8571fd9b1b4855adac632
* | | Rework 'heketi_ops' moduleValerii Ponomarov2018-12-164-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing following: - Remove dead code with usage of Heketi python lib. Because it is not used and not tested. - Remove unused functions in general. - Make existing functions raise exceptions with CLI error message instead of returning 'False' boolean value hiding info about original errors. Change-Id: I1f0def567dd77425397ff2c8ba13f9c0640af5bc
* | | Cleanup unused library functionsValerii Ponomarov2018-12-151-9/+2
| | | | | | | | | | | | Change-Id: I8b62298b45f9e6af45dde60aae6c80c79d312dad
* | | Cleanup base classesValerii Ponomarov2018-12-1517-49/+33
| |/ |/| | | | | | | | | Remove unused/dead code from base classes. Change-Id: Ib355e0282541c60297c1b240f7ff8df3f06d9d69
* | Merge "Delete unused files and dirs"Valerii Ponomarov2018-12-1412-0/+0
|\ \
| * | Delete unused files and dirsValerii Ponomarov2018-12-1012-0/+0
| |/ | | | | | | | | | | | | | | This project has lots of empty files and dirs in addition to not usef files. So, remove all of it to improve navigation through the project. Change-Id: Ib8df2165640e0c59fcee9bb6909ec8c74cb9623f
* | [CNS-954] arbiter expand test casenigoyal2018-12-131-0/+25
| | | | | | | | | | | | | | this test case is verifying that arbiter pvc expand is working properly Change-Id: I52c52c9f299ef53c6c8618677d4f3425b5ba2051
* | Fix error message substituions in 'test_arbiter' modulenigoyal2018-12-121-65/+52
|/ | | | | | | | | | Several existing arbiter test cases have common bug, where we substitute incorrect value in error messages and do it in duplicated code. So, move that code to separate method, reusing it in test cases and fix substitution error. Change-Id: I7787515a4e0cd50c688034dbb41649d96605b2ae
* [CNS-1314][CNS-1285] Restart gluster block volumes and validatevamahaja2018-12-101-7/+130
| | | | | Change-Id: Ib7e3125e5120a91fe431816b33be4d4e6f15078e Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add cmd-runner function which is gluster deployment type agnosticValerii Ponomarov2018-12-071-3/+0
| | | | | | | | | | | | | | For the moment, most of the test cases and lib functions in 'openshift_ops' python module support only containerized Gluster clusters. So, to be able to support standalone Gluster clusters in addition to the containerized ones, add special function which allows us to run shell commands on both types of Gluster clusters autodetecting the type. As an example, update one of the existing lib functions making all the existing 'arbiter' test cases work in both cases. Change-Id: Iad69d7dc692c87eb70ed5caf780cb688f274bf02
* Merge "Move functions with creation of SC, PVC and POD objects to common place"Valerii Ponomarov2018-12-074-342/+90
|\
| * Move functions with creation of SC, PVC and POD objects to common placeValerii Ponomarov2018-12-054-342/+90
| | | | | | | | | | | | | | Removing duplication of code. Also, reuse it in places where it is already duplicated. Change-Id: I2f88b4921cb7bec01d17e1ddeaeda16e0d198493
* | Merge "[CNS-1246] [CNS-1247] test-cases for heketi metrics"Valerii Ponomarov2018-12-051-0/+36
|\ \ | |/ |/|
| * [CNS-1246] [CNS-1247] test-cases for heketi metricsnigoyal2018-12-031-0/+36
| | | | | | | | | | | | | | CNS-1246 - test case for veryfying cluster count of heketi metrics CNS-1247 - test case for veryfying nodes count of heketi metrics Change-Id: Id6c6bdb9bf212b4c302ff56e2f68b5e6e4348143
* | Merge "[CNS-778] Refactor and fix 'test_to_check_entry_in_fstab_file' TC"Valerii Ponomarov2018-12-032-132/+54
|\ \
| * | [CNS-778] Refactor and fix 'test_to_check_entry_in_fstab_file' TCValerii Ponomarov2018-11-202-132/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | List of changes: - Fixed bug, where test didn't fail in case volume brick was not found in fstab file. It was only logging message related to it. - Fixed bug, where we searched for all the brick paths in one single Gluser POD, such thing should have been failing always. Above mentioned bug has hidden this one. - Fixed bug, where test was failing in case we didn't have passwordless SSH connection between test-runner and heketi-client nodes. - Added Heketi volume cleanup for case our test fails before the step with Heketi volume deletion. - Removed redundant copy operations of fstab files. Instead, used 'cat' shell command for getting inner data of fstab files. Change-Id: I76c6a59ab9f40cc5e94923fcc82e5e15f640714a
* | | Merge "[CNS-928] Create PVC using default Storage Class"Valerii Ponomarov2018-11-301-0/+55
|\ \ \
| * | | [CNS-928] Create PVC using default Storage ClassValerii Ponomarov2018-11-291-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be able to create PVC not specifying Storage Class, but having 'default' one. So, add test to cover such feature. Change-Id: Id1d6f14879bbc4af4955af4984ce91c2484fb55f
* | | | [CNS-1041] Resize PVC using all the available free spaceValerii Ponomarov2018-11-291-14/+46
|/ / / | | | | | | | | | | | | | | | | | | We expect that we are able to resize PVC using all the available free space, so add appropriate test case. Change-Id: I1db494d5d7e888fca21bfe1492bfe35e35c3df6a
* | / Cleanup and improve configurationValerii Ponomarov2018-11-277-158/+122
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our config file has dead options as well as unintuitive option names. So, do following improvements: - Delete unused config options from config file example. - Delete setting of dead config options to the base class. - Rename 'storage_class1' and 'storage_class2' config option groups to the 'file_storage_class' and 'block_storage_class' respectively to make it more understandable. - Remove 'secrets' config option group as redundant. Secret names get calculated from custom prefix and randomly generated string. Namespace is used the same as for storage classes. And its 'type' was always storage class's provisioner value. Change-Id: Ifa6d0ab430e8d69591f49bc7bf4c258151662550
* | Merge "Add more details in case of error for CNS-550 tc"Valerii Ponomarov2018-11-231-1/+20
|\ \ | |/ |/|
| * Add more details in case of error for CNS-550 tcValerii Ponomarov2018-11-201-1/+20
| | | | | | | | | | | | | | | | | | If 'test_blockvolume_create_no_free_space' tc fails, then we get too few info about the error. So, add more data to the error message. In addition, add 2 sec sleep to avoid races getting list of block hosting volumes. Change-Id: I53cdff368b4f9813a31226921d0554e98790c7a1
* | Merge "Fix pep8 W605 rule violation"Valerii Ponomarov2018-11-202-9/+9
|\ \
| * | Fix pep8 W605 rule violationValerii Ponomarov2018-11-192-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, string objects, which contain backslash symbol, should be prefixed with 'r' letter which transforms it to 'raw string literal'. Info: https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior Change-Id: I8d5c1c1c022cae9d163dea2e0613c9ca24ddad08
* | | Merge "Refactor test cases CNS-797 and CNS-798"Valerii Ponomarov2018-11-202-193/+193
|\ \ \ | |_|/ |/| |
| * | Refactor test cases CNS-797 and CNS-798Valerii Ponomarov2018-11-132-193/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do following improvements: - Calculate distributed replica vol size dynamically based on the current free space on the heketi devices. - Add check for amount of bricks. - Cleanup volume more correctly. - Check free space after deletion considering the size of deleted vol. - Rename module. - Move module out of "heketi_tests" to the parent dir called "heketi". Change-Id: I42fdfadc97157595857e5a106760391281f59a1a
* | | Merge "Fix 'test_to_check_deletion_of_node' test"Valerii Ponomarov2018-11-201-39/+44
|\ \ \ | |_|/ |/| |
| * | Fix 'test_to_check_deletion_of_node' testValerii Ponomarov2018-11-131-39/+44
| |/ | | | | | | | | | | | | | | | | | | By doing following: - Pick up only online nodes with only online devices. - Create volume to make sure we have some usages in any of a node devices. - Check that node hasn't been deleted at the end of the test. Change-Id: I73154642c9034f84b6748c5cd9df43b67eb01006
* | Merge "Fix CNS-945 test case"Valerii Ponomarov2018-11-191-1/+1
|\ \
| * | Fix CNS-945 test caseValerii Ponomarov2018-11-141-1/+1
| |/ | | | | | | | | | | | | | | Latest version of OCS started using a bit more data for system needs. So, fix CNS-945 test case reducing a bit the expected available free space of PVC. Change-Id: I8e69f75479fac4a7743b8126d96ec582405bfa35