Verify complete configuration rollback
Debian Trixie package bundle / packages (push) Successful in 15m41s
Debian Trixie package bundle / packages (push) Successful in 15m41s
This commit is contained in:
@@ -411,12 +411,18 @@ class ConfigurationStorageTest(unittest.TestCase):
|
||||
def test_store_failure_rolls_back_earlier_documents(self):
|
||||
configurations = copy.deepcopy(self.store.live)
|
||||
original_smtp = copy.deepcopy(self.store.live["smtp"])
|
||||
original_imap = copy.deepcopy(self.store.live["imap"])
|
||||
configurations["smtp"]["socket_timeout"] += 1
|
||||
configurations["imap"]["threads_max"] += 1
|
||||
self.store.fail_name = "imap"
|
||||
with self.assertRaises(ConfigurationError):
|
||||
self.store.save(configurations)
|
||||
self.assertEqual(self.store.live["smtp"], original_smtp)
|
||||
self.assertEqual(self.store.live["imap"], original_imap)
|
||||
self.assertTrue(all(
|
||||
not self.paths.document(name).exists()
|
||||
for name in STORE_DOCUMENTS
|
||||
))
|
||||
|
||||
def test_store_helper_timeout_names_operation_and_document(self):
|
||||
store = ConfigurationStore(self.paths)
|
||||
|
||||
Reference in New Issue
Block a user