From bbb43e20a0cfa789c856ab10aee739b568caf632 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Mon, 8 Jan 2024 18:39:00 +0000 Subject: [PATCH] test(sqltest): Remove impossible assertion Now that there is an auth token fact table in the data warehouse, it is not possible to insert an auth_token with an old public_id even after that auth_token was deleted, since it now causes a constraint violation on the data warehouse table. --- .../tests/purge/trigger_insert_on_delete.sql | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/internal/db/sqltest/tests/purge/trigger_insert_on_delete.sql b/internal/db/sqltest/tests/purge/trigger_insert_on_delete.sql index b15d839cfe..840f1f5e94 100644 --- a/internal/db/sqltest/tests/purge/trigger_insert_on_delete.sql +++ b/internal/db/sqltest/tests/purge/trigger_insert_on_delete.sql @@ -3,7 +3,7 @@ begin; - select plan(13); + select plan(10); -- Verify the trigger functions exist and are declared properly select has_function('insert_deleted_id'); @@ -25,17 +25,6 @@ begin; select is(count(*), 0::bigint) from auth_token where public_id = 'tok____clare'; select is(count(*), 1::bigint) from auth_token_deleted; - -- Add new auth token with duplicate public_id, delete and check that there's no error - insert into auth_token - (key_id, auth_account_id, public_id, token) - values - ('kdkv__colors', 'apa____clare', 'tok____clare', 'tok____clare'::bytea); - prepare delete_again as - delete from auth_token where public_id = 'tok____clare'; - select lives_ok('delete_again'); - select is(count(*), 0::bigint) from auth_token where public_id = 'tok____clare'; - select is(count(*), 1::bigint) from auth_token_deleted; - select * from finish(); rollback;