tests/lvm: re-introduce POOL_CONF
It's still needed by the lvm integration tests. If possible, it should be avoided inside lvm unit tests though as using it will break compatibility with callback unit tests.
This commit is contained in:
		
							parent
							
								
									9e26bfd432
								
							
						
					
					
						commit
						c717dacd8d
					
				| @ -58,6 +58,13 @@ def skipUnlessLvmPoolExists(test_item):  # pylint: disable=invalid-name | |||||||
|     msg = 'LVM thin pool {!r} does not exist'.format(DEFAULT_LVM_POOL) |     msg = 'LVM thin pool {!r} does not exist'.format(DEFAULT_LVM_POOL) | ||||||
|     return unittest.skipUnless(result, msg)(test_item) |     return unittest.skipUnless(result, msg)(test_item) | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | POOL_CONF = {'name': 'test-lvm', | ||||||
|  |              'driver': 'lvm_thin', | ||||||
|  |              'volume_group': DEFAULT_LVM_POOL.split('/')[0], | ||||||
|  |              'thin_pool': DEFAULT_LVM_POOL.split('/')[1]} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| class ThinPoolBase(qubes.tests.QubesTestCase): | class ThinPoolBase(qubes.tests.QubesTestCase): | ||||||
|     ''' Sanity tests for :py:class:`qubes.storage.lvm.ThinPool` ''' |     ''' Sanity tests for :py:class:`qubes.storage.lvm.ThinPool` ''' | ||||||
| 
 | 
 | ||||||
| @ -71,10 +78,7 @@ class ThinPoolBase(qubes.tests.QubesTestCase): | |||||||
|         ''' Other test classes (e.g. callback) may use this to test their own config. ''' |         ''' Other test classes (e.g. callback) may use this to test their own config. ''' | ||||||
|         conf = pool_conf |         conf = pool_conf | ||||||
|         if not conf: |         if not conf: | ||||||
|             conf = {'name': 'test-lvm', |             conf = POOL_CONF | ||||||
|                     'driver': 'lvm_thin', |  | ||||||
|                     'volume_group': DEFAULT_LVM_POOL.split('/')[0], |  | ||||||
|                     'thin_pool': DEFAULT_LVM_POOL.split('/')[1]} |  | ||||||
| 
 | 
 | ||||||
|         cls.pool_class = pool_class |         cls.pool_class = pool_class | ||||||
|         cls.volume_class = volume_class |         cls.volume_class = volume_class | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 3hhh
						3hhh