summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKerim Gokarslan <kgokarsl@cisco.com>2017-08-18 16:05:05 -0700
committerKerim Gokarslan <kgokarsl@cisco.com>2017-08-18 16:37:24 -0700
commit1fe5e7adb3e1d90910c18386ed64d0a787a7bf94 (patch)
tree1f0de78e8851fdc0c16d7aaadf5e2a32b9df19e5 /test
parent5d2becfd9d6398ce9dfd4c83618de42e272ec830 (diff)
[NFVBENCH-7] Return errors when unknown options are passed
1) Return all errors when unknown options are passed 2) Fixed pep8 warnings 3) Fixed image deletion Change-Id: If21ca07c797a602b9a60f3ccae665149ed1ac148 Signed-off-by: Kerim Gokarslan <kgokarsl@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_nfvbench.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py
index a220703..a70e71a 100644
--- a/test/test_nfvbench.py
+++ b/test/test_nfvbench.py
@@ -648,7 +648,11 @@ def test_config():
assert(get_err_config({3: "abc"}, refcfg) is None)
# correctly fails
assert(get_err_config({4: 0}, refcfg) == {4: 0})
- assert(get_err_config({2: {0: 1, 1: 2}}, refcfg) == {2: {0: 1}})
+ assert(get_err_config({2: {21: 100, 30: 50}}, refcfg) == {2: {30: 50}})
+ assert(get_err_config({2: {0: 1, 1: 2}}, refcfg) == {2: {0: 1, 1: 2}})
+ assert(get_err_config({2: {0: 1, 1: 2}, 5: 5}, refcfg) == {2: {0: 1, 1: 2}, 5: 5})
# invalid value type
assert(get_err_config({1: 'abc', 2: {21: 0}}, refcfg) == {1: 'abc'})
- assert(get_err_config({2: 100, 5: 10}, refcfg) == {2: 100})
+ assert(get_err_config({2: 100}, refcfg) == {2: 100})
+ # both correctly fail and invalid value type
+ assert(get_err_config({2: 100, 5: 10}, refcfg) == {2: 100, 5: 10})