Commit Graph

64 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 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 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 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 fe0ec848d4 Add per-client tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-18 20:53:51 +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 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 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
DL6ER 0c13693c57 Add test for domain auditing.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-06 10:10:05 +02:00
Mark Drobnak eba1dcf6f4 Merge pull request #598 from pi-hole/tests/static_binary
Tests: Dependence on shared libraries and a specific interpreter
2019-07-04 18:11:22 -04:00
DL6ER 0d4f08dbd3 Clarify test description
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-04 16:14:10 +02:00
DL6ER a44d594032 Merge branch 'development' into new/networktable_ip_neigh 2019-06-25 19:58:31 +02:00
DL6ER 0afc57fd15 Add detailed test description
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-24 17:06:58 +02:00
DL6ER ef01d67733 Quote environment variable name
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-19 17:49:25 +02:00
DL6ER 03c86f1074 Add tests for dependence on shared libraries and a specific interpreter.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-19 17:48:07 +02:00
DL6ER 725bfd240d Use ?* as wildcard to match one or more characters. This accepts and IP address or hostname but rejects an empty response.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-19 15:03:55 +02:00
DL6ER 977f58b2df Do not expect the local IP to be 127.0.0.1 (it could also be, e.g., 127.1.2.3). Change all tests to just expect something being printed here, may it be an IP address or even a hostname.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-19 14:52:58 +02:00
DL6ER 9ae9598912 Add comments into test suite.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 23:31:26 +02:00
DL6ER 1aee636815 Generalize tests to pass if FTL is able to resolve localhost
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 22:13:32 +02:00
DL6ER d38faa6059 Add test commands (commented) to Dockerfile
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 20:45:11 +02:00
DL6ER b3398f5a9d We should not assume a particular ordering on domains when the have been queried equally often + add busybox ls output as alternative solution for the permissions test.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 20:07:12 +02:00
DL6ER ab7721b11a Generalize tests so they can be run both in the Alpine-based x86_64-musl and in the Debian-based x86_64 containers.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 19:56:24 +02:00
DL6ER c922835b72 Tests: Change schema of network table
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 21:18:23 +02:00
DL6ER 5f44b5b7bb Tests: Added default value for lastSeen column in network_addresses table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 12:21:23 +02:00
DL6ER 46ed609203 Tests: ALTER TABLE ... RENAME TO ... created a table using CREATE TABLE IS NOT EXISTS.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 11:06:12 +02:00
DL6ER 32185d9e49 Merge branch 'development' into new/networktable_ip_neigh 2019-06-16 10:14:36 +02:00
Mcat12 4345f12636 Merge branch 'development' into fix/pihole-FTL.db_mode 2019-06-15 20:52:19 -07:00
DL6ER 634f97a6fb Update tests after having changed table schema
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 10:06:19 +02:00