summaryrefslogtreecommitdiffstats
path: root/vnftest/core
diff options
context:
space:
mode:
authorMoshe <moshehoa@amdocs.com>2018-08-15 12:19:07 +0300
committerMoshe <moshehoa@amdocs.com>2018-08-15 17:00:11 +0300
commit5e5e493a5ec5048c0a340e2acd72f52869779fdf (patch)
treeb4f787f6df2a4414660d7f235dfc128cc86fdc2e /vnftest/core
parent1a54248ad5b5f836ae915413ffefaa487d1f73f5 (diff)
versionize tests due to API changes in ONAP
Issue-ID: VNFSDK-301 Change-Id: I1fdf1b42fc2cd44021c2f33695c86bbbdc8bb62b Signed-off-by: Moshe <moshehoa@amdocs.com> fix tests Issue-ID: VNFSDK-301 Change-Id: I87abc962b13956af07ad8bf7355ea681343664dc Signed-off-by: Moshe <moshehoa@amdocs.com>
Diffstat (limited to 'vnftest/core')
-rw-r--r--vnftest/core/__init__.py1
-rw-r--r--vnftest/core/task.py3
-rw-r--r--vnftest/core/testsuite.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/vnftest/core/__init__.py b/vnftest/core/__init__.py
index 6ef8d70..d734360 100644
--- a/vnftest/core/__init__.py
+++ b/vnftest/core/__init__.py
@@ -25,6 +25,7 @@ class Param(object):
def __init__(self, kwargs):
# list
+ self.environment = kwargs.get('environment')
self.vnfdescriptor = kwargs.get('vnfdescriptor')
self.inputfile = kwargs.get('inputfile')
self.task_args = kwargs.get('task-args')
diff --git a/vnftest/core/task.py b/vnftest/core/task.py
index 5e0267f..91e3d3c 100644
--- a/vnftest/core/task.py
+++ b/vnftest/core/task.py
@@ -72,7 +72,7 @@ class Task(object): # pragma: no cover
output_config['DEFAULT']['dispatcher'] = out_types
def start(self, args, **kwargs):
- Context.initialize(args.vnfdescriptor)
+ Context.initialize(args.vnfdescriptor, args.environment)
atexit.register(self.atexit_handler)
task_id = getattr(args, 'task_id')
@@ -195,7 +195,6 @@ class Task(object): # pragma: no cover
output_config.setdefault('dispatcher_http', {})
output_config.setdefault('dispatcher_file', {})
output_config.setdefault('dispatcher_influxdb', {})
- output_config.setdefault('nsb', {})
def _set_output_config(self, output_config, file_path):
try:
diff --git a/vnftest/core/testsuite.py b/vnftest/core/testsuite.py
index 986982a..9c58886 100644
--- a/vnftest/core/testsuite.py
+++ b/vnftest/core/testsuite.py
@@ -18,6 +18,8 @@
from __future__ import absolute_import
from __future__ import print_function
+import fnmatch
+
import os
import logging
@@ -41,7 +43,7 @@ class Testsuite(object):
def _get_testsuite_file_list(self):
try:
- testsuite_files = sorted(os.listdir(consts.TESTSUITE_DIR))
+ testsuite_files = sorted(fnmatch.filter(os.listdir(consts.TESTSUITE_DIR), '*.yaml'))
except OSError:
LOG.exception('Failed to list dir:\n%s\n', consts.TESTSUITE_DIR)
raise