Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/data
Submodule data updated 70 files
+1 −1 .github/workflows/go.yml
+1 −1 .github/workflows/links.yml
+1 −1 .github/workflows/pages.yml
+1 −1 .github/workflows/precious.yml
+100 −90 .golangci.yml
+ − bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb
+ − bad-data/libmaxminddb/libmaxminddb-deep-nesting.mmdb
+4 −4 go.mod
+6 −6 go.sum
+37 −37 mise.lock
+4 −5 pkg/writer/baddata.go
+9 −26 pkg/writer/decoder.go
+90 −0 pkg/writer/fixtures_test.go
+28 −7 pkg/writer/geoip2.go
+49 −0 pkg/writer/geoip2_test.go
+5 −5 pkg/writer/maxmind.go
+3 −4 pkg/writer/nestedstructures.go
+0 −1 pkg/writer/pointerdos_test.go
+2 −1 pkg/writer/rawmmdb_test.go
+1 −1 pkg/writer/writer.go
+9 −9 source-data/GeoIP-Anonymous-Plus-Test.json
+1 −1 source-data/GeoIP-Regions-Test.json
+10 −10 source-data/GeoIP2-Anonymous-IP-Test.json
+17 −94 source-data/GeoIP2-City-Test.json
+24 −24 source-data/GeoIP2-Connection-Type-Test.json
+17 −17 source-data/GeoIP2-Country-Test.json
+2 −2 source-data/GeoIP2-DensityIncome-Test.json
+89 −89 source-data/GeoIP2-Domain-Test.json
+20 −20 source-data/GeoIP2-Enterprise-Test.json
+4 −4 source-data/GeoIP2-IP-Risk-Test.json
+1,879 −1,879 source-data/GeoIP2-ISP-Test.json
+38 −38 source-data/GeoIP2-Precision-Enterprise-Test.json
+150 −150 source-data/GeoIP2-Static-IP-Score-Test.json
+150 −150 source-data/GeoIP2-User-Count-Test.json
+ − test-data/GeoIP-Anonymous-Plus-Test.mmdb
+ − test-data/GeoIP-Regions-Test.mmdb
+ − test-data/GeoIP-Residential-Proxy-Test.mmdb
+ − test-data/GeoIP2-Anonymous-IP-Test.mmdb
+ − test-data/GeoIP2-City-Shield-Test.mmdb
+ − test-data/GeoIP2-City-Test.mmdb
+ − test-data/GeoIP2-Connection-Type-Test.mmdb
+ − test-data/GeoIP2-Country-Shield-Test.mmdb
+ − test-data/GeoIP2-Country-Test.mmdb
+ − test-data/GeoIP2-DensityIncome-Test.mmdb
+ − test-data/GeoIP2-Domain-Test.mmdb
+ − test-data/GeoIP2-Enterprise-Shield-Test.mmdb
+ − test-data/GeoIP2-Enterprise-Test.mmdb
+ − test-data/GeoIP2-IP-Risk-Test.mmdb
+ − test-data/GeoIP2-ISP-Test.mmdb
+ − test-data/GeoIP2-Precision-Enterprise-Shield-Test.mmdb
+ − test-data/GeoIP2-Precision-Enterprise-Test.mmdb
+ − test-data/GeoIP2-Static-IP-Score-Test.mmdb
+ − test-data/GeoIP2-User-Count-Test.mmdb
+ − test-data/GeoLite2-ASN-Test.mmdb
+ − test-data/GeoLite2-City-Test.mmdb
+ − test-data/GeoLite2-Country-Test.mmdb
+ − test-data/MaxMind-DB-no-ipv4-search-tree.mmdb
+ − test-data/MaxMind-DB-string-value-entries.mmdb
+ − test-data/MaxMind-DB-test-decoder.mmdb
+ − test-data/MaxMind-DB-test-ipv4-24.mmdb
+ − test-data/MaxMind-DB-test-ipv4-28.mmdb
+ − test-data/MaxMind-DB-test-ipv4-32.mmdb
+ − test-data/MaxMind-DB-test-ipv6-24.mmdb
+ − test-data/MaxMind-DB-test-ipv6-28.mmdb
+ − test-data/MaxMind-DB-test-ipv6-32.mmdb
+ − test-data/MaxMind-DB-test-metadata-pointers.mmdb
+ − test-data/MaxMind-DB-test-mixed-24.mmdb
+ − test-data/MaxMind-DB-test-mixed-28.mmdb
+ − test-data/MaxMind-DB-test-mixed-32.mmdb
+ − test-data/MaxMind-DB-test-nested.mmdb
4 changes: 2 additions & 2 deletions tests/reader_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ def test_empty_search_tree_is_accepted(self) -> None:
data = pathlib.Path(
f"{_TEST_DATA_DIR}/MaxMind-DB-test-ipv4-24.mmdb"
).read_bytes()
original = b"node_count\xc1\xa3"
original = b"node_count\xc1\x8b"
self.assertEqual(data.count(original), 1)
with (
io.BytesIO(data.replace(original, b"node_count\xc0")) as database,
Expand All @@ -2194,7 +2194,7 @@ def test_invalid_tree_metadata_is_rejected_on_open(self) -> None:
cases = (
(b"record_size\xa1\x18", b"record_size\xa1\x1e", "Unknown record size: 30"),
(
b"node_count\xc1\xa3",
b"node_count\xc1\x8b",
b"node_count\x04\x01\xff\xff\xff\xff",
"The node_count value -1 is out of range",
),
Expand Down
Loading