Commit Graph

201 Commits

Author SHA1 Message Date
DL6ER 637558f5aa Rename send_http_error() to send_http_internal_error().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER 8cedaf76eb Disable test that does not apply without a hosted web interface and add two new tests for /api/auth.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER 31d0d8f75f A test should do what is written in its description
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER baa4b37ddc Add --slient to the curl commands to suppress the output of curl's progress bar during the tests. They are confusing bats.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER 91e1e99d31 Use curl instead of wget for the HTTP API tests.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER 4a07a9ffcd Add tests for JSON/normal error 404.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:26:54 +02:00
DL6ER e2d72189e7 Do not consider ERROR index.html as fatal during the tests + typo fixes.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 00:22:51 +02:00
DL6ER f537507c49 Remove rusty Telnet API. Note that this intermediate version of FTL has NO API at all.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-26 23:48:07 +02:00
DL6ER 6cf54db9ad Use wget instead of curl in the tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-26 23:34:29 +02:00
DL6ER 8ef74a773c Add ping callback and pong test for CI.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-26 23:34:29 +02:00
DL6ER 8fd09cd584 Merge pull request #739 from MichaIng/patch-1
Use /run instead of /var/run for FTL runtime files
2020-05-25 21:27:33 +02:00
DL6ER df6c13103e Add "not stripped" to arm-qemu test
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-25 19:56:20 +02:00
DL6ER c2d309401d Also check result of "file pihole-FTL" to do some further checks on the generated binary. This now includes a check for the minimum supported Linux version.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-25 19:37:47 +02:00
DL6ER da006e52ae Add checks for the compiled binary for all supported CI platforms.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-25 18:55:21 +02:00
MichaIng 0fd1e341da Use /run instead of /var/run for FTL runtime files
Compare with: https://github.com/pi-hole/pi-hole/pull/3248#issuecomment-620752054

Signed-off-by: MichaIng <micha@dietpi.com>
2020-05-01 12:41:33 +02:00
DL6ER 742e742449 CircleCI has an unforseeable number of devices in its ARP cache. Do not check for a strict number of clients during the tests. No changes to the source code.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-03-31 16:51:30 +00:00
DL6ER 3e2ef282f8 Merge pull request #713 from pi-hole/new/NAPTR
Add support for Name Authority Pointer (NAPTR) resource record
2020-03-17 23:07:37 +00: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 bb9f25cb85 Merge pull request #664 from pi-hole/new/group_zero
Add group zero support
2019-12-18 22:36:46 +01:00
DL6ER d752539a6f Do not try to resolve client host names during the tests. This occasionally leads to false-negatives during the CI testing (the CI cannot always resolve the hostnames).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-18 10:01:12 +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 b37de5ce1a Add test for reporting blocking status correctly to pihole.log file.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-24 12:18:58 +02: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 268312249a Run FTL in DEBUG_ALL mode to increase log verbosity during tests.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-19 18:18:34 +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 62af161473 Tests: Do not rely on the non-existance of regexa.com
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-05 21:18:08 +02:00
DL6ER ad94faf196 Adjust tests now that we have one IP reply more.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-05 21:16:55 +02:00
DL6ER 0d450d9f31 We store the domains converted to lowercase so we should compare case-insensitive if we look for exact matches later.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-05 21:16:55 +02:00
DL6ER ca37be09a0 Adjust tests now that we have one IP reply more.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-04 20:40:02 +02:00
DL6ER b93d6ee13b We store the domains converted to lowercase so we should compare case-insensitive if we look for exact matches later.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-04 20:35:11 +02:00
DL6ER 97aad2fd17 Undo testing for blacklisted.com in the Top Domains.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-04 19:33:28 +02:00
DL6ER 2b5e778dd4 Display number of domain in gravity table as number of blocked domains in the API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-04 18:57:52 +02:00
DL6ER b17d0579ad Ensure whitelist (exact + regex) has higher importance than gravity and blacklist.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-04 18:45:55 +02:00
DL6ER f3e8d23baf Merge branch 'development' into new/whitelist-regex-support
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-17 15:01:32 +02:00
DL6ER 5b4d88867f Merge branch 'development' into tweak/bbusy_timeouts
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-21 21:52:58 +02:00
DL6ER b21b551a52 Add busy timeout for database connections.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-21 21:43:03 +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 8431914084 Add tests for: Reported architecture, reported build machine, and reported compiler (+version). The tests are adaptive and can test both the situation found on the CI as well as locally.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-15 17:17:56 +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 43a2c9fc82 Adjust expected statistics as we query additional domains now.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-09 15:25:22 +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