1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/appsettings/tests
catborise a4ea23004f chore(appsettings): one squashed migration for a new database
0001_initial to 0024_log_retention_setting are mostly RunPython steps
that added, renamed, re-chose and described setting rows since 2020. A
squashed migration now creates the table in its final shape and inserts
the 38 rows those steps leave; it replaces all 24, so a new database
runs it alone. The 24 stay beside it, as Django's squashing expects
until every installation has applied them: a database that applied
them all records the squashed one without running anything, and one
that stopped between them (an older release, or an upstream
installation) applies the rest of them first.

Checked:
- on a new database its rows equal the old chain's (name, key, value,
  choices, description of every row);
- on a copy of a running panel's database (all 24 applied) migrate
  plans nothing for appsettings;
- a database migrated by the old code to 0023 applies 0024 and then
  records the squashed migration, with the same 38 rows;
- makemigrations finds no change.

It inserts its rows on the database being migrated, as the replaced steps
do. The tests of the replaced steps stay, since an installation that stopped
between them still runs them; the two that checked a few rows' columns
became one that checks every row's columns and description, and a value is
one of its choices.
2026-11-06 13:47:23 +03:00
..
__init__.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_appsettings.py fix(locale): the VM page's and Settings page's messages show translated 2026-11-02 23:09:05 +03:00
test_audit_rows.py fix(appsettings): a group saves what was edited, all of it or none, in one row 2026-10-26 10:12:53 +03:00
test_backup.py fix(backup): TLS client certificates persist in Docker and are backed up 2026-11-06 09:12:34 +03:00
test_get_settings.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_migrations.py chore(appsettings): one squashed migration for a new database 2026-11-06 13:47:23 +03:00
test_theme_name.py build: the themes ship compiled, libsass is no longer installed 2026-10-18 22:36:29 +03:00
test_themes.py build: the themes ship compiled, libsass is no longer installed 2026-10-18 22:36:29 +03:00