diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-06 12:13:48 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-06 13:20:31 +0100 |
commit | 87b32f4366fbe25f48711a42ffd4e2d8215ce1ca (patch) | |
tree | 7e337a1296ff28f947c895a764b862ad0adfd8a1 /yardstick/tests/unit | |
parent | ab8629071966fb46a4eeac473cda3352424fa350 (diff) |
Add network elements as a dict in Kubernetes context
Like in Heat context, network elements should be defined in a
dictionary, using the network name as the entry key.
Previous implementation:
context:
networks:
- name: ...
plugin: ...
args: ...
New implementation:
context:
networks:
net_name_1:
plugin: ...
args: ...
net_name_2: ...
JIRA: YARDSTICK-1160
Change-Id: I786b06555af509440604305e2c3c2c9fe521bef8
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/tests/unit')
-rw-r--r-- | yardstick/tests/unit/orchestrator/test_kubernetes.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/yardstick/tests/unit/orchestrator/test_kubernetes.py b/yardstick/tests/unit/orchestrator/test_kubernetes.py index 5eba1a02a..8e64c8fe1 100644 --- a/yardstick/tests/unit/orchestrator/test_kubernetes.py +++ b/yardstick/tests/unit/orchestrator/test_kubernetes.py @@ -340,13 +340,10 @@ class NetworkObjectTestCase(base.BaseUnitTestCase): def test__init_missing_parameter(self): with self.assertRaises( exceptions.KubernetesNetworkObjectDefinitionError): - kubernetes.NetworkObject(name='name', plugin='plugin') + kubernetes.NetworkObject('network_name', plugin='plugin') with self.assertRaises( exceptions.KubernetesNetworkObjectDefinitionError): - kubernetes.NetworkObject(name='name', args='args') - with self.assertRaises( - exceptions.KubernetesNetworkObjectDefinitionError): - kubernetes.NetworkObject(args='args', plugin='plugin') + kubernetes.NetworkObject('network_name', args='args') @mock.patch.object(kubernetes_utils, 'get_custom_resource_definition') def test_crd(self, mock_get_crd): |