Opened 6 months ago

Last modified 5 months ago

#30858 assigned defect

Load geoip and geoip6 files during the unit tests

Reported by: teor Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Minor Keywords: technical-debt, geoip, fast-fix?, easy?, teor-backlog-ci
Cc: karsten, nickm Actual Points:
Parent ID: Points: 0.5
Reviewer: Sponsor: Sponsor31-can


We don't run any tests on the contents of the geoip and geoip6 files.

We should write a test that loads the files, and fails if they fail to parse, are empty, or have an unexpected number of entries. (+-25% of the current number of entries?)

We might want a #define that skips the test, so that people can build and test without geoip. (We might eventually want geoip to be an optional module, but that's out of scope.)

Maybe karsten can tell us how much the number of entries in the geoip files varies?

Child Tickets

Attachments (1)

geoip-line-counts.png (51.3 KB) - added by karsten 6 months ago.

Download all attachments as: .zip

Change History (4)

Changed 6 months ago by karsten

Attachment: geoip-line-counts.png added

comment:1 in reply to:  description Changed 6 months ago by karsten

Replying to teor:

Maybe karsten can tell us how much the number of entries in the geoip files varies?


Looks like a static expected line count wouldn't last forever, but it would certainly be useful to have such a +/- 25% sanity check. I can run tests whenever I update files and include a note that the expected line count requires an update.

comment:2 Changed 6 months ago by teor

Owner: set to teor
Status: newassigned

I want to add this task to my backlog, I'm waiting to see how gaba wants me to do that.

comment:3 Changed 5 months ago by teor

Keywords: teor-backlog-ci added
Owner: teor deleted
Sponsor: Sponsor31-can

Some of these tickets are part of the sponsor 31 CI improvements task, we will pick the specific tickets later, and assign them to people.

Note: See TracTickets for help on using tickets.