Skip to content

Commit 0222cdc

Browse files
committed
Address review comments
1 parent f4d0dfd commit 0222cdc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

stackhpc_inspector_plugins/tests/unit/test_plugins_ib_physnet.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017 StackHPC Ltd.
1+
# Copyright (c) 2018 StackHPC Ltd.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -58,10 +58,18 @@ def test_expected_data_ib(self):
5858
physnet = self.hook.get_physnet(port, 'em1', self.data)
5959
self.assertEqual(physnet, 'physnet1')
6060

61-
def test_expected_data_non_ib(self):
61+
def test_expected_data_client_id_is_none(self):
6262
cfg.CONF.set_override('ib_physnet', 'physnet1',
6363
group='port_physnet')
6464
self.data['all_interfaces']['em1']['client_id'] = None
6565
port = self.node_info.ports().values()[0]
6666
physnet = self.hook.get_physnet(port, 'em1', self.data)
6767
self.assertIsNone(physnet)
68+
69+
def test_expected_data_no_client_id(self):
70+
cfg.CONF.set_override('ib_physnet', 'physnet1',
71+
group='port_physnet')
72+
del self.data['all_interfaces']['em1']['client_id']
73+
port = self.node_info.ports().values()[0]
74+
physnet = self.hook.get_physnet(port, 'em1', self.data)
75+
self.assertIsNone(physnet)

0 commit comments

Comments
 (0)