tests: use random dbname in hobo tests (and cleanup) (#86729) #1116

Merged
fpeters merged 1 commits from wip/86729-hobo-sql-random into main 2024-02-15 10:10:17 +01:00
Owner
No description provided.
fpeters added 1 commit 2024-02-09 08:16:10 +01:00
fpeters reviewed 2024-02-09 08:31:15 +01:00
@ -272,0 +272,4 @@
}
z.writestr('config.json', json.dumps(CONFIG))
yield True
shutil.rmtree(skeleton_dir)
Author
Owner

Plutôt que réutiliser le long des tests ce qui a été construit, je modifie la fixture pour ensuite nettoyer le répertoire, puis les éventuelles bases de données supplémentaires.

Plutôt que réutiliser le long des tests ce qui a été construit, je modifie la fixture pour ensuite nettoyer le répertoire, puis les éventuelles bases de données supplémentaires.
@ -76,6 +77,7 @@ class Command(TenantCommand):
options['json_filename'] = hobo_json_path
self.init_tenant_publisher(tenant.hostname, register_tld_names=False)
self.deploy(**options)
cleanup_connection()
Author
Owner

Sinon une connexion à la db reste ouverte et la suppression échoue, façon

E       psycopg2.errors.ObjectInUse: database "wcstests_hobo_34589_wcs_example_net" is being accessed by other users
E       DETAIL:  There is 1 other session using the database.
Sinon une connexion à la db reste ouverte et la suppression échoue, façon ``` E psycopg2.errors.ObjectInUse: database "wcstests_hobo_34589_wcs_example_net" is being accessed by other users E DETAIL: There is 1 other session using the database. ```
fpeters changed title from WIP: tests: use random dbname in hobo tests (and cleanup) (#86729) to tests: use random dbname in hobo tests (and cleanup) (#86729) 2024-02-09 08:31:19 +01:00
fpeters requested review from vdeniaud 2024-02-14 19:33:06 +01:00
vdeniaud approved these changes 2024-02-15 10:03:31 +01:00
fpeters merged commit 9975013b03 into main 2024-02-15 10:10:17 +01:00
fpeters deleted branch wip/86729-hobo-sql-random 2024-02-15 10:10:17 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/wcs#1116
No description provided.