feat(updater): support updates after verified SeaweedFS migration

This commit is contained in:
2026-09-28 15:47:06 +02:00
parent 790f20b499
commit 2b947c5e8f
20 changed files with 1074 additions and 67 deletions

View File

@@ -70,6 +70,16 @@ class UnixConnection(http.client.HTTPConnection):
class ServiceTests(unittest.TestCase):
def test_storage_fields_are_sanitized_and_new_phases_remain_compatible(self):
plan = s.public_plan({'storageProvider': 'seaweedfs', 'storageImageRetained': True,
'storageBackupPaths': ['/private/storage'], 'service': {'secret': 'hidden'}})
self.assertEqual(plan['storageProvider'], 'seaweedfs')
self.assertTrue(plan['storageImageRetained'])
self.assertNotIn('private', json.dumps(plan))
self.assertNotIn('hidden', json.dumps(plan))
self.assertEqual(s.public_state({'phase': 'checking_storage'})['phase'], 'validating')
self.assertEqual(s.public_state({'phase': 'storage_adopted'})['phase'], 'resolved')
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.root = Path(self.temp.name)