From ce75381bdce754d40f632894f81a31ba6771a39f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 11 May 2019 19:35:28 +0200 Subject: Add all RefStack lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It adds platform and object targets. refstack_defcore is renamed to refstack_compute. Change-Id: Iad5bfb27be614aada98eef5b3148965e65210725 Signed-off-by: Cédric Ollivier --- functest/ci/testcases.yaml | 39 ++++++++++++++++++++-- .../opnfv_tests/openstack/refstack/refstack.py | 12 +++---- 2 files changed, 42 insertions(+), 9 deletions(-) (limited to 'functest') diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index ee66426fd..e9451380e 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -201,17 +201,50 @@ tiers: - 'gnocchi' - - case_name: refstack_defcore + case_name: refstack_compute project_name: functest criteria: 100 blocking: false deny_skipping: true description: >- This test case runs a sub group of tests of the OpenStack - Defcore testcases. + Compute testcases. run: - name: refstack_defcore + name: refstack args: + target: compute + option: + - '--concurrency=4' + + - + case_name: refstack_object + project_name: functest + criteria: 100 + blocking: false + deny_skipping: true + description: >- + This test case runs a sub group of tests of the OpenStack + Object testcases. + run: + name: refstack + args: + target: object + option: + - '--concurrency=4' + + - + case_name: refstack_platform + project_name: functest + criteria: 100 + blocking: false + deny_skipping: true + description: >- + This test case runs a sub group of tests of the OpenStack + Platform testcases. + run: + name: refstack + args: + target: platform option: - '--concurrency=4' diff --git a/functest/opnfv_tests/openstack/refstack/refstack.py b/functest/opnfv_tests/openstack/refstack/refstack.py index 9eb937165..5e06c8c07 100644 --- a/functest/opnfv_tests/openstack/refstack/refstack.py +++ b/functest/opnfv_tests/openstack/refstack/refstack.py @@ -24,12 +24,9 @@ class Refstack(tempest.TempestCommon): __logger = logging.getLogger(__name__) - defcorelist = os.path.join( - getattr(config.CONF, 'dir_refstack_data'), 'defcore.txt') - - def _extract_refstack_data(self): + def _extract_refstack_data(self, refstack_list): yaml_data = "" - with open(self.defcorelist) as def_file: + with open(refstack_list) as def_file: for line in def_file: try: grp = re.search(r'^([^\[]*)(\[.*\])\n*$', line) @@ -63,8 +60,11 @@ class Refstack(tempest.TempestCommon): return yaml.full_load(yaml_data2) def generate_test_list(self, **kwargs): + refstack_list = os.path.join( + getattr(config.CONF, 'dir_refstack_data'), + "{}.txt".format(kwargs.get('target', 'compute'))) self.backup_tempest_config(self.conf_file, '/etc') - refstack_data = self._extract_refstack_data() + refstack_data = self._extract_refstack_data(refstack_list) tempest_data = self._extract_tempest_data() with open(self.list, 'w') as ref_file: for key in refstack_data.keys(): -- cgit 1.2.3-korg