1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

fix(appsettings): the console and NIC settings say what they do

The four console settings (scale, view-only, resize session, clip
viewport) said "The console starts ...", but they set how a VNC console
starts; a serial console has none of them, and typed into a view-only
one. The NIC model setting said "default" was libvirt's choice, while
a new VM with "default" gets a VirtIO card. Their descriptions now say
so (migration 0025).
This commit is contained in:
catborise 2026-11-13 12:39:41 +03:00
parent 5a52bcf43e
commit f47b79b0ed
6 changed files with 74 additions and 1 deletions

View file

@ -71,13 +71,15 @@ class ChoicesFixTestCase(TestCase):
descriptions = importlib.import_module("appsettings.migrations.0021_setting_descriptions")
vnc_and_nic = importlib.import_module("appsettings.migrations.0025_vnc_console_and_nic_descriptions")
class DescriptionsTestCase(TestCase):
def test_every_setting_says_what_it_does_within_its_column(self):
limit = AppSettings._meta.get_field("description").max_length
removed = {"VIEW_INSTANCE_DETAIL_BOTTOM_BAR"} # by 0023
for key, text in descriptions.DESCRIPTIONS.items():
# as the last migration that describes a setting says
for key, text in {**descriptions.DESCRIPTIONS, **vnc_and_nic.DESCRIPTIONS}.items():
with self.subTest(key=key):
self.assertLessEqual(len(text), limit)
if key not in removed: