summaryrefslogtreecommitdiffstats
path: root/test/test_nfvbench.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2017-08-28 08:04:52 -0700
committerahothan <ahothan@cisco.com>2017-08-28 08:04:52 -0700
commitfd72e102b0d6b6b62f72a06ad950e7959c54d7ef (patch)
tree14df0210eac0791b06df88370e5014808437637c /test/test_nfvbench.py
parent4d3864c3972250654c3750764c2cf18e13c631d8 (diff)
NFVBENCH-11 Cannot override extra_specs in flavor using -c1.0.3
Add a whitelist for keys that can't be verified Change-Id: I8d56cb850fb133eec0097ae80f6ee5f827e651c6 Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'test/test_nfvbench.py')
-rw-r--r--test/test_nfvbench.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py
index 1d985b8..ff4625b 100644
--- a/test/test_nfvbench.py
+++ b/test/test_nfvbench.py
@@ -673,7 +673,13 @@ def test_config():
expected = fail_pair[0]
assert expected in e_info.value.message
-
+ # whitelist keys
+ flavor = {'flavor': {'vcpus': 2, 'ram': 8192, 'disk': 0,
+ 'extra_specs': {'hw:cpu_policy': 'dedicated'}}}
+ new_flavor = {'flavor': {'vcpus': 2, 'ram': 8192, 'disk': 0,
+ 'extra_specs': {'hw:cpu_policy': 'dedicated', 'hw:numa_nodes': 2}}}
+ assert(config_loads("{'flavor': {'extra_specs': {'hw:numa_nodes': 2}}}", flavor,
+ whitelist_keys=['alpha', 'extra_specs']) == new_flavor)
def test_fluentd():
logger = logging.getLogger('fluent-logger')