Skip to content

Fix/94 gatewayidentity test fail - #102

Merged
3 commits merged into
developfrom
fix/94-gatewayidentity-test-fail
Sep 8, 2026
Merged

Fix/94 gatewayidentity test fail#102
3 commits merged into
developfrom
fix/94-gatewayidentity-test-fail

Conversation

@kusuri12-09

Copy link
Copy Markdown
Member

Summary

  • CI에서 제외되어 있던 Gateway 및 Identity 테스트의 코드 측 실패 원인을 수정합니다.
  • Gateway 라우트 정의를 routeId, downstreamKey, pathPrefix로 분리해 evaluation·schedule을 포함한 모든 라우트를 충돌 없이 등록합니다.
  • 외부 Redis와 Docker가 필요한 통합 테스트에 local skip/CI strict 실행 정책을 적용합니다.
  • Identity test profile 설정과 MySQL 8.4 Testcontainer 연결 옵션을 보완합니다.
  • .github/workflows/ci.yml 변경은 이 PR에 포함하지 않습니다.

Related Issue

Root Cause

  • Gateway bootstrap 테스트가 기본값 없는 운영 환경변수를 포함한 base 설정을 그대로 읽어 Spring context 생성에 실패했습니다.
  • Gateway proxy 테스트가 실제 GatewayService.pathPrefix 대신 /api/{service}를 조립해 /api/document 라우트를 404로 요청했습니다.
  • evaluation과 schedule이 기존 downstream 이름을 route ID로 재사용할 수 있어 라우트 및 circuit state key 충돌 가능성이 있었습니다.
  • Redis 통합 테스트는 Redis가 없는 로컬 환경에서도 무조건 실패했고, CI에서 외부 의존성 누락을 skip으로 숨기지 않을 strict 조건이 없었습니다.
  • Identity bootstrap 테스트에 test profile 전용 보안·Redis·PASS 설정이 없었습니다.
  • Identity JPA 통합 테스트는 MySQL 8.4의 공개키 조회에 필요한 JDBC 옵션이 없었고, Docker 미가용 시 CI에서도 skip될 수 있었습니다.

Fix Description

  • GatewayDownstream을 추가해 하나의 downstream URI를 여러 개의 고유한 Gateway route가 공유하도록 변경했습니다.
  • 모든 Gateway route의 ID, path prefix, downstream 설정을 검증하고 application/evaluation 및 configuration/schedule 매핑 테스트를 추가했습니다.
  • proxy 통합 테스트가 GatewayService.entries와 각 항목의 pathPrefix를 단일 진실 공급원으로 사용하도록 수정했습니다.
  • Gateway bootstrap 테스트에 dev profile, in-memory resilience store, random server port를 적용했습니다.
  • GATEWAY_INTEGRATION_REQUIRED=true인 경우 Redis 연결 실패를 테스트 실패로 처리하고, 기본 로컬 실행에서는 Redis 의존 테스트만 명시적으로 skip하도록 integration gate를 추가했습니다.
  • Identity bootstrap Bazel 테스트에 src/test/resources를 포함하고 application-test.yml을 추가했습니다.
  • Identity JPA Testcontainer JDBC URL에 allowPublicKeyRetrieval=true를 추가했습니다.
  • IDENTITY_INTEGRATION_REQUIRED=true인 경우 Docker 미가용을 실패로 처리하도록 기존 Identity integration gate를 연결했습니다.

Testing

  • Reproduced before fix
  • Verified after fix
  • Test details:
    • bazel test //systems/gateway/gateway-adapter-in:test //systems/gateway/gateway-domain:test //systems/gateway/gateway-bootstrap:test //systems/identity/identity-bootstrap:test //systems/identity/identity-adapter-out:test --test_output=errors
    • 결과: 5개 Bazel test target 모두 통과
    • Redis 실행 및 strict 환경변수 적용 시 Gateway Redis 통합 테스트 3건이 skip 없이 통과함
    • 로컬에 외부 Redis 또는 Docker가 없으면 해당 통합 테스트만 gate 정책에 따라 skip될 수 있음

Risk & Impact

  • Risk level: Medium
  • Affected areas: Gateway 라우트 등록·proxy·circuit state key, Gateway Redis 통합 테스트, Identity bootstrap test profile, Identity JPA 통합 테스트
  • 운영 base 설정의 fail-fast 환경변수 계약과 공개 REST 경로는 변경하지 않습니다.
  • CI에서 strict 통합 테스트를 실제로 실행하려면 Redis service, test env 전달, 기존 제외 인자 제거 작업이 별도로 필요합니다.

Checklist

  • No new regressions introduced
  • Edge cases considered
  • Logs / error handling updated if needed

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ready-for-review
🚫 Excluded labels (none allowed) (2)
  • wip
  • do-not-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 91864a28-699f-4a52-9eeb-27aed1f94de5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kusuri12-09
kusuri12-09 requested a review from tlgms September 8, 2026 11:30
@kusuri12-09 kusuri12-09 closed this pull request by merging all changes into develop in da103ea Sep 8, 2026
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.

gateway/identity 테스트 3개 타깃 실패로 CI에서 임시 제외 중

1 participant