Skip to content

Add GeoIP-Regions test fixture - #290

Open
mmpnelson wants to merge 1 commit into
mainfrom
pnelson/add-geoip-regions-test-database
Open

mmpnelson wants to merge 1 commit into
mainfrom
pnelson/add-geoip-regions-test-database

Conversation

@mmpnelson

@mmpnelson mmpnelson commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Adds a 5-record test MMDB for the GeoIP-Regions database type. Records cover IPv4 and IPv6 networks, ranked alternate_locations with country and subdivision confidences, multiple subdivisions on one record, an alternate country with no subdivisions, alternates without confidence values, and a record with no alternate_locations.

Summary by CodeRabbit

  • Tests
    • Expanded GeoIP region test coverage for IPv4, IPv6, and IPv4-mapped IPv6 addresses.
    • Added test scenarios covering country, location, subdivision, confidence, and alternate-location metadata.
    • Updated test database generation to include the GeoIP regions dataset alongside existing database types.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7402ca85-fd0f-4514-9892-c422b50516fc

📥 Commits

Reviewing files that changed from the base of the PR and between 7fcd868 and 6f982b5.

📒 Files selected for processing (3)
  • pkg/writer/geoip2.go
  • source-data/GeoIP-Regions-Test.json
  • test-data/GeoIP-Regions-Test.mmdb

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Changes

GeoIP Regions database generation

Layer / File(s) Summary
Add region data and generation mapping
source-data/GeoIP-Regions-Test.json, pkg/writer/geoip2.go
The test data adds five IPv4 and IPv6 records with geographic metadata. The writer includes GeoIP-Regions in the database generation map.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 6f982

The new GeoIP Regions fixture and committed MMDB are valid and load correctly, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a GeoIP-Regions test fixture.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pnelson/add-geoip-regions-test-database

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

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant