diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2017-02-27 10:34:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-27 10:34:32 +0000 |
commit | 939bb873620bfaab4465674d241dfd48513584cf (patch) | |
tree | f6d068f77ffaaa0a2c5fe46ab7274fa9c2a9009c /functest | |
parent | 8625d61b7ef8059ecaf3fb0613888de490d31715 (diff) | |
parent | 7bd62366a97d4ec8b6f18c13057cb2904431df93 (diff) |
Merge "Adding vRouter test codes using TestCasesBase"
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() |