]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
geoipbackend: Move geo2.example.com to separate file
authorAki Tuomi <cmouse@cmouse.fi>
Sun, 1 May 2022 18:48:29 +0000 (21:48 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Mon, 28 Aug 2023 12:44:07 +0000 (15:44 +0300)
Tests the new feature of loading zones from dir.

regression-tests/backends/geoip-master

index a88db8f2d1e0b46dbf662b9ea3f453f89eb85857..2018929324075cb97c80557617d88374161b1409 100644 (file)
@@ -76,6 +76,26 @@ domains:
 mapping_lookup_formats: ['%cn']
 custom_mapping:
   $geoipregion: earth
+EOF
+                if ! [ -d $testsdir/geozones ]; then
+                   mkdir $testsdir/geozones
+                fi
+                cat > $testsdir/geozones/geo2.yaml <<EOF
+zone:
+  domain: geo2.example.com
+  ttl: 30
+  records:
+    geo2.example.com:
+      - soa: ns1.example.com hostmaster.example.com 2014090125 7200 3600 1209600 3600
+      - ns: ns1.example.com
+      - ns: ns2.example.com
+      - mx: 10 mx.example.com
+    moon.map.geo2.example.com:
+      - txt: "overridden moon mapping"
+  services:
+    map.geo2.example.com: '%mp.map.geo2.example.com'
+  custom_mapping:
+    $geoipregion: moon
 EOF
                cat > $testsdir/region-a-resolution/expected_result <<EOF
 0      www.geo.example.com.    30      IN      A       $geoipregionip