blockdev: Clarify error messages pertaining to 'node-name'

Signed-off-by: Connor Kuehl <ckuehl@redhat.com>
Message-Id: <20210305151929.1947331-3-ckuehl@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Connor Kuehl 2021-03-05 09:19:29 -06:00 committed by Kevin Wolf
parent 785ec4b1b9
commit ef2e38a1a1
2 changed files with 10 additions and 9 deletions

View file

@ -140,8 +140,8 @@ class TestBlockdevReopen(iotests.QMPTestCase):
self.reopen(opts, {'file': 'hd0-file'})
# We cannot change any of these
self.reopen(opts, {'node-name': 'not-found'}, "Cannot find node named 'not-found'")
self.reopen(opts, {'node-name': ''}, "Cannot find node named ''")
self.reopen(opts, {'node-name': 'not-found'}, "Failed to find node with node-name='not-found'")
self.reopen(opts, {'node-name': ''}, "Failed to find node with node-name=''")
self.reopen(opts, {'node-name': None}, "Invalid parameter type for 'node-name', expected: string")
self.reopen(opts, {'driver': 'raw'}, "Cannot change the option 'driver'")
self.reopen(opts, {'driver': ''}, "Invalid parameter ''")
@ -158,7 +158,7 @@ class TestBlockdevReopen(iotests.QMPTestCase):
# node-name is optional in BlockdevOptions, but x-blockdev-reopen needs it
del opts['node-name']
self.reopen(opts, {}, "Node name not specified")
self.reopen(opts, {}, "node-name not specified")
# Check that nothing has changed
self.check_node_graph(original_graph)