Skip to content

Commit 339ab40

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "fix functional tests for network agents"
2 parents d9f236b + 14ff3ba commit 339ab40

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

openstackclient/network/v2/network_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def get_parser(self, prog_name):
168168

169169
def take_action(self, parsed_args):
170170
client = self.app.client_manager.network
171-
obj = client.get_agent(parsed_args.network_agent, ignore_missing=False)
171+
obj = client.get_agent(parsed_args.network_agent)
172172
attrs = {}
173173
if parsed_args.description is not None:
174174
attrs['description'] = str(parsed_args.description)
@@ -193,7 +193,7 @@ def get_parser(self, prog_name):
193193

194194
def take_action(self, parsed_args):
195195
client = self.app.client_manager.network
196-
obj = client.get_agent(parsed_args.network_agent, ignore_missing=False)
196+
obj = client.get_agent(parsed_args.network_agent)
197197
columns = tuple(sorted(list(obj.keys())))
198198
data = utils.get_item_properties(obj, columns, formatters=_formatters,)
199199
return columns, data

openstackclient/tests/functional/network/v2/test_network_agent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
# License for the specific language governing permissions and limitations
1111
# under the License.
1212

13-
import testtools
14-
1513
from openstackclient.tests.functional import base
1614

1715

@@ -28,13 +26,11 @@ def test_network_agent_list(cls):
2826
# get the list of network agent IDs.
2927
cls.IDs = raw_output.split('\n')
3028

31-
@testtools.skip('broken SDK testing')
3229
def test_network_agent_show(self):
3330
opts = self.get_opts(self.FIELDS)
3431
raw_output = self.openstack('network agent show ' + self.IDs[0] + opts)
3532
self.assertEqual(self.IDs[0] + "\n", raw_output)
3633

37-
@testtools.skip('broken SDK testing')
3834
def test_network_agent_set(self):
3935
opts = self.get_opts(['admin_state_up'])
4036
self.openstack('network agent set --disable ' + self.IDs[0])

openstackclient/tests/unit/network/v2/test_network_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,6 @@ def test_show_all_options(self):
324324
columns, data = self.cmd.take_action(parsed_args)
325325

326326
self.network.get_agent.assert_called_once_with(
327-
self._network_agent.id, ignore_missing=False)
327+
self._network_agent.id)
328328
self.assertEqual(self.columns, columns)
329329
self.assertEqual(list(self.data), list(data))

0 commit comments

Comments
 (0)