Dominik
f5f87d3ffb
fix: sync test gravity.db.sql schema with production database
...
The test schema had drifted from the real /etc/pihole/gravity.db:
- domainlist/adlist used single-column UNIQUE instead of composite
UNIQUE(domain,type) / UNIQUE(address,type), causing silent SQL
failures on INSERT ... ON CONFLICT
- adlist column order had `type` in wrong position
- client table had `NOL NULL` typo (should be `NOT NULL`)
- *_by_group tables were missing ON DELETE CASCADE and WITHOUT ROWID
- info table was missing WITHOUT ROWID
- vw_gravity had extra `AND adlist.type = 0` filter not in production
- vw_adlist was missing `type` column in SELECT
- domainlist views had ORDER BY clauses not present in production
- Three indexes were missing (idx_adlist_by_group_gid,
idx_domainlist_by_group_gid, idx_gravity)
Signed-off-by: Dominik <dl6er@dl6er.de >
2026-03-30 20:32:12 +02:00
DL6ER
fe29217860
Rename the views from white/black to allow/deny as well as some internal constants for consistency. Note that this requires an increase in gravity database version
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2025-08-15 19:56:28 +02:00
DL6ER
72aea366fa
Port gravity.db update to version 19 into FTL's testing harness
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-28 11:10:58 +01:00
DL6ER
7c29048009
Translate anti-/gravity list IDs to negative numbers so they can be distinguish from domains rather easily. Users are free to foil this method when they force negative IDs into the database but they will never be automatically created
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-25 06:10:01 +01:00
Dominik
17a2038b22
Merge pull request #1807 from pi-hole/tweak/special_domains_prio
...
Implement special domains allowing
2023-12-13 19:45:14 +01:00
DL6ER
34cfc9c465
Remove undocumented audit feature
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-08 07:53:49 +01:00
DL6ER
6a42fc5757
Tests: Add CI test for allowing special domains per group
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-07 20:54:49 +01:00
DL6ER
470689da47
Add antigravity and /api/search related CI tests
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-10-07 21:52:42 +02:00
DL6ER
f8b8e63044
Add antigravity (subscribed allowlists with wildcard support)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-09-15 21:39:04 +02:00
DL6ER
07f1f7df44
Save number of ABP-style entries in adlist table's new column abp_entries
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-06-15 09:38:37 +02:00
DL6ER
44c3fe4ef4
Merge remote-tracking branch 'origin/development' into new/http
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-03-13 10:30:39 +01:00
DL6ER
ae9b291082
Set abp_domains = 1 during the CI tests.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-02-26 07:19:48 +01:00
DL6ER
8794b1684d
Add ABP format blocking support for gravity. Note that the option needs to be switched on by setting GRAVITY_ABP_STYLE=true in pihole-FTL.conf to avoid running this computationally expensive task on the vast majority of user databases only fed from properly formatted HOSTS lists. Gravity can enable the setting when it detects ABP format automatically.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-02-15 19:48:19 +01:00
DL6ER
9833fe1af0
Reload gravity database when 'updated' property in table 'info' has changed
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-02-05 16:44:14 +01:00
DL6ER
5e2e6e6fa4
Merge branch 'development' into new/http
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-02-01 21:48:41 +01:00
DL6ER
49e1c74455
New syntax: querytype=A accepts now also a list (like querytype=A,AAAA,MX). You can use the exclamation mark as before for inversion (querytype=!A) matches everything BUT type A queries. This has now been extended to be able to invert a list, too (like (querytype=!A,AAAA matches everything BUT A and AAAA queries)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-01-26 20:11:55 +01:00
DL6ER
a9ea62a3fc
Merge branch 'development' into new/http
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-12-30 15:12:14 +01:00
DL6ER
0f520269d8
Merge pull request #1415 from pi-hole/adlist_message_table
...
Add warning about inaccessible adlists to message table (Pi-hole diagnosis)
2022-09-08 13:42:30 +02:00
DL6ER
84085bebcd
Tests: CNAME inspection: NODATA CNAME targets are blocked
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-09-05 20:07:19 +02:00
Christian König
94a28040fa
Update gravity.db.sql
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-08-31 23:51:29 +02:00
DL6ER
20ba471ccd
pihole-FTL.log was renamed to FTL.log
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-07-17 12:20:28 +02:00
DL6ER
fd2a633d20
Use FTLs embedded SQLite3 engine for the tests instead of relying whatever the system may be providing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-18 15:37:42 +01:00
DL6ER
c0570c51c2
Merge branch 'development' into new/http
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-11-02 09:53:13 +01:00
yubiuser
65c9fc0147
Simplify vw_adlist
...
Signed-off-by: yubiuser <ckoenig@posteo.de >
2021-10-13 22:24:03 +01:00
DL6ER
8be285c375
Speed up regex option tests by predefining them instead of injecting during runtime
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-10-10 12:10:13 +02:00
DL6ER
02154d2023
Add powerDNS to the CI testing suite to serve zone ftl. locally
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-10-10 12:08:41 +02:00
DL6ER
1db7c40106
Update tests
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-04-26 14:40:06 +02:00
DL6ER
45faefa786
Merge branch 'development' into new/http
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-04-26 14:09:50 +02:00
DL6ER
07642c8ab7
Tests: Update gravity.db template used for the tests to version 12.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-23 16:49:08 +02:00
DL6ER
873bcf8cc3
Tests: Add tests for MAC address and interface name client selections.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-06-23 16:49:08 +02:00
DL6ER
1af474819c
Update tests to use gravity domain count stored in test database.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-02-03 08:43:06 +01:00
DL6ER
abf0e4cdec
Adjust tests after the last bugfix, bring gravity.db.sql schema to version 9.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-12-30 20:54:11 +00:00
DL6ER
b6d74c701c
Fix two testing errors.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-12-18 22:13:07 +00:00
DL6ER
80584788ad
Add new zero-group-specific tests (domain associated ONLY to a particular query is only seen by this client).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-12-12 17:51:44 +00:00
DL6ER
5637d132bf
Update FTL gravity.db.sql template to gravity database version 7.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-12-12 17:42:26 +00:00
DL6ER
685d4a7c5b
Add tests for a third client that is member of an empty group. This client bypasses Pi-hole entirely as no adlists, exact or regex blacklists are enabled for it.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-19 18:55:41 +02:00
DL6ER
382e8dd43b
Tests: add third client that does not block anything (tagged with an empty group)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-19 16:00:02 +02:00
DL6ER
fe0ec848d4
Add per-client tests
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-18 20:53:51 +02:00
DL6ER
609e09ad5f
Merge branch 'development' into new/internal-blocking
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-10 21:15:20 +02:00
DL6ER
06c885a150
Improve tests by testing only against our own testing domains instead of relying on the outcome of some formally randomly selected domains.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-09 22:07:15 +02:00
DL6ER
c19067b6a3
Update gravity.db.sql to version 4
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-09 21:46:23 +02:00
DL6ER
429a71dd56
Improve tests by testing only against our own testing domains instead of relying on the outcome of some formally randomly selected domains.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-09-09 21:45:29 +02:00
DL6ER
be1b573a2a
Rename regex blacklist trigger to tr_regex_blacklist_update.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-16 11:36:00 +02:00
DL6ER
d362a5eb27
Merge branch 'development' into new/whitelist-regex-support
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-14 22:50:53 +02:00
DL6ER
95be30dd83
Add test "Regex blacklist match + whitelist regex match is not blocked".
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-09 15:49:15 +02:00
DL6ER
ea6cddb76e
Added 8 new tests ensuring both whitelist exact and regex unblock regex as well as gravity domains as expected.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-09 12:27:24 +02:00
DL6ER
c0eedd59db
Rename table regex to regex_blacklist.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-08 21:12:43 +02:00
DL6ER
b0838aaffa
Temporarily disable regex debugging as it generated hundreds of thousands of messages during gravity import.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-07 22:59:51 +02:00
DL6ER
d79891daaf
New table is called regex_whitelist (at least for now).
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-07 22:52:23 +02:00
DL6ER
fdff462fa4
Add support for regex filters for whitelisting.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2019-07-07 22:46:28 +02:00