mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-01 16:36:06 +00:00
fix(instances): a VM name of any length libvirt takes is kept
libvirt names a VM by its <name>.xml file, so a name can have up to 251 bytes. The panel's VM, removed-VM and log records held 120 characters: on PostgreSQL one longer name made the host's sync fail and the VM list answer with an error. They now hold 255. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
e83bdcbd44
commit
373760f2c5
8 changed files with 68 additions and 8 deletions
|
|
@ -25,11 +25,11 @@ class WriteTests(TestCase):
|
|||
self.assertEqual(row.ip, "192.0.2.7")
|
||||
|
||||
def test_long_values_are_cut(self):
|
||||
write("u" * 200, "h" * 300, "i" * 200, "m" * 5000)
|
||||
write("u" * 200, "h" * 300, "i" * 300, "m" * 5000)
|
||||
row = Logs.objects.get()
|
||||
self.assertEqual(len(row.user), 150)
|
||||
self.assertEqual(len(row.host), 255)
|
||||
self.assertEqual(len(row.instance), 120)
|
||||
self.assertEqual(len(row.instance), 255)
|
||||
self.assertEqual(len(row.message), 5000)
|
||||
|
||||
def test_a_failed_write_inside_a_transaction_leaves_it_usable(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue