From 14541da96bde6b0ec2e54eccce7f067cab4e768b Mon Sep 17 00:00:00 2001 From: seizeh Date: Sat, 21 Nov 2026 15:01:08 +0900 Subject: [PATCH] =?UTF-8?q?fix(test):=20t19=20=EC=8B=9C=EB=93=9C=20?= =?UTF-8?q?=EC=A0=84=ED=99=94=EB=B2=88=ED=98=B8=EB=A5=BC=20=EA=B3=B5?= =?UTF-8?q?=EC=9A=A9=20=EC=8B=9C=EB=93=9C=20=EB=8C=80=EC=97=AD=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=E2=80=94=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EB=8D=B0=EB=AA=A8=20=EA=B3=84=EC=A0=95=EA=B3=BC=20?= =?UTF-8?q?=EC=B6=A9=EB=8F=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit t19 는 간이 계정 3개를 010-9999-000x 로 시드했는데, 테스트 서버(PAWMATE-TEST)에는 그 번호를 쓰는 데모 계정이 있어 첫 INSERT 가 users_phone_uq 위반으로 멈췄다. 스위트 29개 중 이 파일만 그 서버에서 실패했다(2026-11-11 실측). 운영·CI(스냅샷·리플레이) 에는 그 번호가 없어 지금까지 드러나지 않았다. helpers/seed.sql 과 t02·t10·t13 이 쓰는 010-0000 대역으로 옮긴다(뒷자리 190x = t19). 단언의 기대값 2곳도 같이 바꿨고, 이유는 파일 주석에 남겼다. 검증: 새 번호 3개가 운영·테스트 DB 어디에도 없음을 확인. 테스트 서버에서 t19 6/6, 전체 스위트 29개 파일·단언 227개 통과(전부 롤백, 잔여 시드 0). Co-Authored-By: Claude Opus 5.5 --- supabase/tests/t19_lite_account_purge_test.sql | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/supabase/tests/t19_lite_account_purge_test.sql b/supabase/tests/t19_lite_account_purge_test.sql index 1128352..796fb7a 100644 --- a/supabase/tests/t19_lite_account_purge_test.sql +++ b/supabase/tests/t19_lite_account_purge_test.sql @@ -9,10 +9,15 @@ set local search_path = public, app, extensions; select plan(6); -- 간이 계정 3종 — 후기 있음 / 후기 없음(어제) / 후기 없음(방금). +-- +-- 전화번호는 helpers/seed.sql 과 같은 010-0000 대역에서 고른다(뒷자리 190x = t19). +-- 종전의 010-9999-000x 는 테스트 서버(PAWMATE-TEST)의 데모 계정 번호와 겹쳐 시드 +-- INSERT 가 users_phone_uq 에 막혔다 — 스위트 중 이 파일만 그 서버에서 실패했다 +-- (2026-11-11). 실사용 번호처럼 생긴 값은 어느 DB 의 데이터와도 언제든 겹칠 수 있다. with u as ( insert into public.users (username, password_hash, nickname, user_type, phone, phone_verified, status, created_at) - values ('t_lite_kept', '!', 'lite_kept', 'no_pet', '01099990001', + values ('t_lite_kept', '!', 'lite_kept', 'no_pet', '01000001901', true, 'lite', now() - interval '2 days') returning id ) insert into seed select 'lite_kept', id from u; @@ -20,7 +25,7 @@ with u as ( with u as ( insert into public.users (username, password_hash, nickname, user_type, phone, phone_verified, status, created_at) - values ('t_lite_gone', '!', 'lite_gone', 'no_pet', '01099990002', + values ('t_lite_gone', '!', 'lite_gone', 'no_pet', '01000001902', true, 'lite', now() - interval '2 days') returning id ) insert into seed select 'lite_gone', id from u; @@ -29,7 +34,7 @@ with u as ( with u as ( insert into public.users (username, password_hash, nickname, user_type, phone, phone_verified, status, created_at) - values ('t_lite_fresh', '!', 'lite_fresh', 'no_pet', '01099990003', + values ('t_lite_fresh', '!', 'lite_fresh', 'no_pet', '01000001903', true, 'lite', now()) returning id ) insert into seed select 'lite_fresh', id from u; @@ -55,7 +60,7 @@ select app.cleanup_retention(); -- ① 후기가 남아 있으면 보존 — 작성자 식별·정식 전환 연결에 계속 쓰인다. select is( (select phone from public.users where id = (select id from seed where k='lite_kept')), - '01099990001', '후기가 있는 간이 계정은 전화번호를 보존한다'); + '01000001901', '후기가 있는 간이 계정은 전화번호를 보존한다'); -- ② 후기가 하나도 없으면 파기 — 이용조건 §3 이 약속한 바로 그 동작. select is( @@ -68,7 +73,7 @@ select is( -- ③ 유예 안(방금 생성)은 건드리지 않는다 — 후기를 쓰는 중일 수 있다. select is( (select phone from public.users where id = (select id from seed where k='lite_fresh')), - '01099990003', '생성 직후 간이 계정은 유예 기간이라 보존한다'); + '01000001903', '생성 직후 간이 계정은 유예 기간이라 보존한다'); -- ④ 정식 회원은 후기 유무와 무관하게 대상이 아니다. select is(