libvmod-geoip2 icon indicating copy to clipboard operation
libvmod-geoip2 copied to clipboard

Create datasets for testing

Open fgsch opened this issue 6 years ago • 1 comments

Currently we use the files from libmaxminddb.

This means that it is impossible to run make check from a GH created tarball (or zip) since submodules are not packaged.

One alternative is to create our own set of files that live in this repor and the tests could use.

fgsch avatar Sep 30 '19 10:09 fgsch

Did you consider using adding a GitHub action to download the test files, or include script to fetch them? This is what I use in our environment (excerpt)

#!/bin/bash
# ...
MAXMINDTESTDB="https://github.com/maxmind/MaxMind-DB/raw/main/test-data"

MAXMINDTESTFILES=(
  'GeoIP2-City-Test'
  'GeoIP2-Connection-Type-Test'
  'GeoIP2-ISP-Test'
  'MaxMind-DB-test-decoder'
)

mkdir -p libmaxminddb/t/maxmind-db/test-data

for i in "${MAXMINDTESTFILES[@]}"; do
  wget -q -P libmaxminddb/t/maxmind-db/test-data/ "${MAXMINDTESTDB}/${i}.mmdb"
done

make check || error_exit 'Failed to make check'
# ...

GeertHauwaerts avatar Jul 02 '22 10:07 GeertHauwaerts

@GeertHauwaerts Nop, thanks for the suggestion. I will have a look 👍

fgsch avatar Dec 30 '23 18:12 fgsch

Done.

fgsch avatar Jan 03 '24 03:01 fgsch