diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2017-05-16 11:28:14 +0200 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-05-16 14:29:48 +0000 |
commit | d180eabc5a2c2453d04bb4a080874c329605c026 (patch) | |
tree | f41fb4c9cfcbe62c03868f25bc6c673a66651ecd /functest/ci | |
parent | 8cfa8d15a572cbae8bd46dae2a19f9b764684a12 (diff) |
Add enabled flag in testcases.yaml
This will allow enable/disable test cases directly
using true/false.
Change-Id: Iaa7d051ebb8dd9e5a6f835a823f58f1e17a87b8d
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'functest/ci')
-rwxr-xr-x | functest/ci/run_tests.py | 7 | ||||
-rw-r--r-- | functest/ci/testcases.yaml | 59 | ||||
-rw-r--r-- | functest/ci/tier_builder.py | 5 | ||||
-rw-r--r-- | functest/ci/tier_handler.py | 5 |
4 files changed, 59 insertions, 17 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 493d5f9c..76760096 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -40,6 +40,10 @@ class BlockingTestFailed(Exception): pass +class TestNotEnabled(Exception): + pass + + class RunTestsParser(object): def __init__(self): @@ -114,6 +118,9 @@ def get_run_dict(testname): def run_test(test, tier_name, testcases=None): + if not test.is_enabled(): + raise TestNotEnabled("The test case {} is not enabled" + .format(test.get_name())) test_name = test.get_name() logger.info("\n") # blank line print_separator("=") diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 7009e910..d98a2de2 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -19,7 +19,6 @@ tiers: simple queries. When the config value of snaps.use_keystone is True, functest must have access to the cloud's private network. - dependencies: installer: '^((?!netvirt).)*$' scenario: '' @@ -39,13 +38,13 @@ tiers: simple queries. When the config value of snaps.use_keystone is True, functest must have access to the cloud's private network. - dependencies: installer: '^((?!netvirt).)*$' scenario: '' run: module: 'functest.opnfv_tests.openstack.snaps.api_check' class: 'ApiCheck' + - case_name: snaps_health_check project_name: functest @@ -63,6 +62,7 @@ tiers: run: module: 'functest.opnfv_tests.openstack.snaps.health_check' class: 'HealthCheck' + - name: smoke order: 1 @@ -266,6 +266,7 @@ tiers: testcases: - case_name: promise + enabled: false project_name: promise criteria: 100 blocking: false @@ -283,6 +284,7 @@ tiers: - case_name: doctor-notification + enabled: false project_name: doctor criteria: 100 blocking: false @@ -300,6 +302,7 @@ tiers: - case_name: bgpvpn + enabled: false project_name: sdnvpn criteria: 100 blocking: false @@ -317,6 +320,7 @@ tiers: - case_name: security_scan + enabled: false project_name: securityscanning criteria: 100 blocking: false @@ -334,6 +338,7 @@ tiers: - case_name: copper + enabled: false project_name: copper criteria: 100 blocking: false @@ -351,6 +356,7 @@ tiers: - case_name: multisite + enabled: false project_name: multisite criteria: 100 blocking: false @@ -363,8 +369,10 @@ tiers: run: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestMultisite' + - case_name: functest-odl-sfc + enabled: false project_name: sfc criteria: 100 blocking: false @@ -379,8 +387,10 @@ tiers: class: 'BashFeature' args: cmd: 'cd /home/opnfv/repos/sfc/sfc/tests/functest && python ./run_tests.py' + - case_name: onos_sfc + enabled: false project_name: functest criteria: 100 blocking: true @@ -393,8 +403,10 @@ tiers: run: module: 'functest.opnfv_tests.sdn.onos.onos' class: 'OnosSfc' + - case_name: parser-basics + enabled: false project_name: parser criteria: 100 blocking: false @@ -409,8 +421,10 @@ tiers: class: 'BashFeature' args: cmd: 'cd /home/opnfv/repos/parser/tests && ./functest_run.sh' + - case_name: domino-multinode + enabled: false project_name: domino criteria: 100 blocking: false @@ -425,8 +439,10 @@ tiers: class: 'BashFeature' args: cmd: 'cd /home/opnfv/repos/domino && ./tests/run_multinode.sh' + - case_name: gluon_vping + enabled: false project_name: netready criteria: 100 blocking: false @@ -441,8 +457,10 @@ tiers: class: 'BashFeature' args: cmd: 'cd /home/opnfv/repos/netready/test/functest && python ./gluon-test-suite.py' + - case_name: barometercollectd + enabled: false project_name: barometer criteria: 100 blocking: false @@ -458,6 +476,7 @@ tiers: run: module: 'functest.opnfv_tests.features.barometer' class: 'BarometerCollectd' + - name: components order: 3 @@ -481,6 +500,7 @@ tiers: run: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestFullParallel' + - case_name: tempest_custom project_name: functest @@ -499,6 +519,7 @@ tiers: run: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestCustom' + - case_name: rally_full project_name: functest @@ -537,22 +558,26 @@ tiers: run: module: 'functest.opnfv_tests.vnf.ims.cloudify_ims' class: 'CloudifyIms' -# - -# case_name: aaa -# project_name: functest -# criteria: 100 -# blocking: false -# clean_flag: true -# description: >- -# Test suite from Parser project. -# dependencies: -# installer: '' -# scenario: '' -# run: -# module: 'functest.opnfv_tests.vnf.aaa.aaa' -# class: 'AaaVnf' + + - + case_name: aaa + enabled: false + project_name: functest + criteria: 100 + blocking: false + clean_flag: true + description: >- + Test suite from Parser project. + dependencies: + installer: '' + scenario: '' + run: + module: 'functest.opnfv_tests.vnf.aaa.aaa' + class: 'AaaVnf' + - case_name: orchestra_ims + enabled: false project_name: functest criteria: 100 blocking: false @@ -568,6 +593,7 @@ tiers: - case_name: opera_vims + enabled: false project_name: opera criteria: 100 blocking: false @@ -583,6 +609,7 @@ tiers: - case_name: vyos_vrouter + enabled: false project_name: functest criteria: 100 blocking: false diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py index e1939c37..12562f09 100644 --- a/functest/ci/tier_builder.py +++ b/functest/ci/tier_builder.py @@ -47,12 +47,15 @@ class TierBuilder(object): dep = th.Dependency(installer, scenario) testcase = th.TestCase(name=dic_testcase['case_name'], + enabled=dic_testcase.get( + 'enabled', True), dependency=dep, criteria=dic_testcase['criteria'], blocking=dic_testcase['blocking'], clean_flag=dic_testcase['clean_flag'], description=dic_testcase['description']) - if testcase.is_compatible(self.ci_installer, self.ci_scenario): + if (testcase.is_compatible(self.ci_installer, self.ci_scenario) + and testcase.is_enabled()): tier.add_test(testcase) self.tier_objects.append(tier) diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py index fe7372a3..36ce245e 100644 --- a/functest/ci/tier_handler.py +++ b/functest/ci/tier_handler.py @@ -105,12 +105,14 @@ class Tier(object): class TestCase(object): def __init__(self, name, + enabled, dependency, criteria, blocking, clean_flag, description=""): self.name = name + self.enabled = enabled self.dependency = dependency self.criteria = criteria self.blocking = blocking @@ -138,6 +140,9 @@ class TestCase(object): def get_name(self): return self.name + def is_enabled(self): + return self.enabled + def get_criteria(self): return self.criteria |