diff options
Diffstat (limited to 'functest')
-rwxr-xr-x | functest/ci/config_functest.yaml | 1 | ||||
-rwxr-xr-x | functest/ci/testcases.yaml | 13 | ||||
-rwxr-xr-x | functest/opnfv_tests/vnf/router/__init__.py | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/vnf/router/vyos_vrouter.py | 33 |
4 files changed, 47 insertions, 0 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 7beb9d4b..489c395f 100755 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -29,6 +29,7 @@ general: repo_domino: /home/opnfv/repos/domino repo_snaps: /home/opnfv/repos/snaps repo_securityscan: /home/opnfv/repos/securityscanning + repo_vrouter: /home/opnfv/repos/vrouter functest: /home/opnfv/functest functest_test: /home/opnfv/repos/functest/functest/opnfv_tests results: /home/opnfv/functest/results diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index ccf9baee..be12ac76 100755 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -470,3 +470,16 @@ tiers: run: module: 'functest.opnfv_tests.vnf.ims.opera_ims' class: 'ImsVnf' + + - + name: vyos_vrouter + criteria: 'status == "PASS"' + blocking: false + description: >- + This test case is vRouter testing. + dependencies: + installer: 'fuel' + scenario: 'nosdn-nofeature' + run: + module: 'functest.opnfv_tests.vnf.router.vyos_vrouter' + class: 'VrouterVnf' diff --git a/functest/opnfv_tests/vnf/router/__init__.py b/functest/opnfv_tests/vnf/router/__init__.py new file mode 100755 index 00000000..e69de29b --- /dev/null +++ b/functest/opnfv_tests/vnf/router/__init__.py diff --git a/functest/opnfv_tests/vnf/router/vyos_vrouter.py b/functest/opnfv_tests/vnf/router/vyos_vrouter.py new file mode 100755 index 00000000..94a3ecfd --- /dev/null +++ b/functest/opnfv_tests/vnf/router/vyos_vrouter.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# +# Copyright 2017 Okinawa Open Laboratory +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +import functest.core.feature_base as base +import json +import os + +RESULT_DETAILS_FILE = "test_result.json" + + +class VrouterVnf(base.FeatureBase): + def __init__(self): + super(VrouterVnf, self).__init__(project='vRouter', + case='vyos_vrouter', + repo='dir_repo_vrouter') + self.cmd = 'cd %s && ./run.sh' % self.repo + + def set_result_details(self): + filepath = os.path.join(self.repo, RESULT_DETAILS_FILE) + if os.path.exists(filepath): + f = open(filepath, 'r') + self.details = json.load(f) + f.close() + + def log_results(self): + if self.criteria == 'PASS': + self.set_result_details() + super(VrouterVnf, self).log_results() |