def testQcow2Compat(self): # Make sure we raise on invalid compat version with self.assertRaises(ValueError): cmd = v2v.V2VCommand({'qcow2_compat': 'foobar'}, None, None) # Make sure vdsm-compat capability is supported cmd = v2v.V2VCommand({}, None, None) self.assertIn('vdsm-compat-option', cmd._v2v_caps) # Look for the command line argument cmd = v2v.V2VCommand({'qcow2_compat': '1.1'}, None, None) self.assertIn('--vdsm-compat', cmd._base_command) i = cmd._base_command.index('--vdsm-compat') self.assertEqual('1.1', cmd._base_command[i + 1])
def testQcow2Compat(self): # Make sure we raise on invalid compat version with pytest.raises(ValueError): cmd = v2v.V2VCommand({'qcow2_compat': 'foobar'}, None, None) # Make sure vdsm-compat capability is supported cmd = v2v.V2VCommand({}, None, None) assert 'vdsm-compat-option' in cmd._v2v_caps # Look for the command line argument cmd = v2v.V2VCommand({'qcow2_compat': '1.1'}, None, None) assert '--vdsm-compat' in cmd._base_command i = cmd._base_command.index('--vdsm-compat') assert '1.1' == cmd._base_command[i + 1]
def testV2VCapabilities(self): cmd = v2v.V2VCommand({}, None, None) self.assertIn('virt-v2v', cmd._v2v_caps) self.assertIn('input:libvirt', cmd._v2v_caps) self.assertIn('output:vdsm', cmd._v2v_caps)
def testV2VCapabilities(self): cmd = v2v.V2VCommand({}, None, None) assert 'virt-v2v' in cmd._v2v_caps assert 'input:libvirt' in cmd._v2v_caps assert 'output:vdsm' in cmd._v2v_caps