Opened 17 months ago

Last modified 8 months ago

#30858 new 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:

Description

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 17 months ago.

Download all attachments as: .zip

Change History (6)

Changed 17 months ago by karsten

Attachment: geoip-line-counts.png added

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

Replying to teor:

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

Sure!


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 16 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 16 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.

comment:4 Changed 9 months ago by gaba

Sponsor: Sponsor31-can

No more sponsor 31. All this tickets remained open after sponsor 31 ended.

comment:5 Changed 8 months ago by teor

Status: assignednew

Change tickets that are assigned to nobody to "new".

Note: See TracTickets for help on using tickets.