iotests: Restrict file Python tests to file

Most of our Python unittest-style tests only support the file protocol.
You can run them with any other protocol, but the test will simply
ignore your choice and use file anyway.

We should let them signal that they require the file protocol so they
are skipped when you want to test some other protocol.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2019-09-02 21:33:18 +02:00 committed by Kevin Wolf
parent 88d2aa533a
commit 103cbc771e
26 changed files with 52 additions and 26 deletions

View file

@ -1122,4 +1122,5 @@ class TestOrphanedSource(iotests.QMPTestCase):
self.assert_qmp(result, 'error/class', 'GenericError')
if __name__ == '__main__':
iotests.main(supported_fmts=['qcow2', 'qed'])
iotests.main(supported_fmts=['qcow2', 'qed'],
supported_protocols=['file'])