Fix a functional test for 'nova agent-list'

The os-agents APIs have been removed by the following change.

  I9512f605dd2b3b0e88c951ed086250d57056303d

This patch fixes a gate failure.
A subsequent patch will make things related to
the os-agents APIs deprecated.

Change-Id: I9dab95fda5902bf9619393eb2c4a22d9f395d65a
Closes-Bug: #1909899
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume 2021-01-03 21:42:11 +09:00
parent 8c011febd9
commit 1b5f29a3a4

View File

@ -86,8 +86,16 @@ class SimpleReadOnlyNovaClientTest(base.ClientTestBase):
self.nova('help')
def test_agent_list(self):
self.nova('agent-list')
self.nova('agent-list', flags='--debug')
ex = self.assertRaises(exceptions.CommandFailed,
self.nova, 'agent-list')
self.assertIn(
"This resource is no longer available. "
"No forwarding address is given. (HTTP 410)", str(ex))
ex = self.assertRaises(exceptions.CommandFailed,
self.nova, 'agent-list', flags='--debug')
self.assertIn(
"This resource is no longer available. "
"No forwarding address is given. (HTTP 410)", str(ex))
def test_migration_list(self):
self.nova('migration-list')