1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 11:46:49 +00:00

fix(migrations): a fresh PostgreSQL database migrates, and CI tests it

The first appsettings migrations insert the default rows with fixed ids,
which a PostgreSQL id sequence does not see; the login lockout migration,
the first to insert without an id, then collided with id 1. It now moves
the sequence past the existing rows first (a no-op on sqlite), which also
covers a database upgraded from any earlier migration. A test compute
password exceeded its 14-character column, which only PostgreSQL enforces.
This commit is contained in:
catborise 2026-10-07 15:59:10 +03:00
parent 85706c5df6
commit f889861e18
4 changed files with 63 additions and 3 deletions

View file

@ -34,14 +34,14 @@ class APISecurityTestCase(TestCase):
name="api-test-compute",
hostname="127.0.0.1",
login="libvirt_user",
password="secret_hypervisor_password",
password="hv-secret-pw",
type=1,
)
self.empty_compute = Compute.objects.create(
name="empty-test-compute",
hostname="127.0.0.1",
login="libvirt_user",
password="secret_hypervisor_password",
password="hv-secret-pw",
type=1,
)
self.flavor = Flavor.objects.create(