From 2320cae3f4d0c55fe2e92ffa70974f758454c0f0 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Mon, 3 Jul 2023 00:25:17 +0200 Subject: [PATCH] Fix test for import_contact Depending on the number of test ran before this test, the sequence could overlap with the existing ids and fail because the on conflict do update would update multiple rows. --- test/import_contact.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/import_contact.sql b/test/import_contact.sql index 5b3d383..df3a908 100644 --- a/test/import_contact.sql +++ b/test/import_contact.sql @@ -90,6 +90,8 @@ values (12, 'ABNANL2A') , (13, 'ARBNNL22') ; +-- make sure there is no overlap with selected id above when importing new contacts +alter sequence contact_contact_id_seq restart with 14; select is( begin_import_contacts(), 'imported_contact', 'Should return the name of the relation to import' );