Skip to content

test(plans): pin funding-match tests to fixed review dates - #35

Merged
jhjh0512 merged 1 commit into
mainfrom
claude/project-thread-w0wr4z
Sep 28, 2026
Merged

jhjh0512 merged 1 commit into
mainfrom
claude/project-thread-w0wr4z

Conversation

@jhjh0512

Copy link
Copy Markdown
Contributor

Requested by 최준형 · project thread

관련 Issue 없음 (날짜 의존 테스트 점검에서 나온 수정)

변경 내용

테스트만 고칩니다. 앱 코드와 카탈로그는 바꾸지 않습니다.

  • funding-matches.test.ts의 DB 묶음은 실제 검수 카탈로그를 적재한 뒤 route를 호출합니다. 그런데 route는 서버의 한국 시간 오늘로 판정합니다. 서울신용보증재단 상품 3건의 nextReviewAt이 2026-10-20이라 2026-10-21부터 3건이 REVIEW_OVERDUE로 바뀌고, "저장된 프로필로 판정하고 프로필 수정이 다음 조회에 반영된다"의 POST_REGISTRATION 3 단언과 NEEDS_CONFIRMATION 3 단언이 실패합니다.
    • 테스트용 합성 카탈로그를 만들 때 nextReviewAt을 FAR_FUTURE로 바꿉니다. 단, TEST_DATE에 이미 검토일이 지난 상품(강북 입주 모집, 2026-09-16)은 그대로 둬서 REVIEW_OVERDUE를 유지합니다.
  • route 단위 테스트의 expect(body.asOfDate).toBe(todayInKst())는 요청 중에 KST 자정을 넘기면 하루가 어긋납니다. 요청 전후 날짜 중 하나와 같은지 확인하도록 바꿨습니다.

PR #34가 고치는 applicationPeriod.end: '2026-12-31' 고정값과는 겹치지 않습니다.

검증

  • npm --prefix app run verify:fast 통과: Test Files 15 passed, Tests 233 passed, 32 skipped. 건너뛴 32건은 DB 테스트입니다.
  • DB 테스트는 임시 PostgreSQL 16에 migration을 적용한 뒤 TEST_DATABASE_URL로 직접 돌렸습니다. funding-matches, candidates, loan-assumption 3개 파일에서 61 passed, 0 skipped였습니다. 프로젝트 기준인 17은 아닙니다.
  • 재현: todayInKst()의 기본 시각만 로컬에서 2026-10-21로 임시 변경했고, 이 변경은 커밋하지 않았습니다.
    • main의 테스트: expected +0 to be 3으로 1건 실패
    • 이 PR의 테스트: 15 passed
  • 실행하지 못한 검사: 전체 verify:db와 verify(E2E 포함)는 이 환경에 PostgreSQL 17과 E2E 환경이 없어 돌리지 못했습니다.

위험·후속

  • API·DB·데이터 계약 영향은 없습니다.
  • DB 묶음 단언(총 5건, 상태별 건수)은 여전히 실제 카탈로그 내용에 묶여 있습니다. 카탈로그를 다시 검수해 상품이나 조건이 바뀌면 숫자를 함께 고쳐야 합니다.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LWNwRr8Mh7VS1DM1w5hfLQ


Generated by Claude Code

The DB suite loads the real funding catalog and calls the route, which
judges with the server's KST date. Three products have nextReviewAt
2026-10-20, so from 2026-10-21 they turn REVIEW_OVERDUE and the
POST_REGISTRATION/NEEDS_CONFIRMATION assertions fail. Push future
review dates in the synthetic copy to FAR_FUTURE and keep already
overdue ones as-is.

Also accept either the KST date before or after the request when
checking asOfDate, so the unit test does not race KST midnight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LWNwRr8Mh7VS1DM1w5hfLQ
@jhjh0512 jhjh0512 self-assigned this Sep 28, 2026
@jhjh0512
jhjh0512 merged commit 172c3d6 into main Sep 28, 2026
1 check passed
@jhjh0512
jhjh0512 deleted the claude/project-thread-w0wr4z branch September 28, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants