Commit Graph

52 Commits

Author SHA1 Message Date
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 b6d74c701c Fix two testing errors.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-18 22:13:07 +00: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 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 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 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 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 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 b3fa8256f9 Also run tests using the 32 bit binary
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-17 21:21:40 +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
Mcat12 4345f12636 Merge branch 'development' into fix/pihole-FTL.db_mode 2019-06-15 20:52:19 -07:00
DL6ER 7c7c47507c Create PID and PORT files. The tests failed due to FTL warning not being able to create these files.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 07:53:59 +02:00
DL6ER 2e7bd3e72d Merge branch 'development' into fix/pihole-FTL.db_mode
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 07:49:38 +02:00
DL6ER efd3ce8a1c Explicitly specify shell in runuser command
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-12 21:24:44 +02:00
DL6ER 0ef1ef6193 Set shell of user pihole to nologin
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-12 21:16:05 +02:00
DL6ER 2e8e6b0c91 Run tests as user pihole
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-10 10:35:52 +02:00
DL6ER 420f58a79b Add test for ownership and permissions of pihole-FTL.db given a restrictive umask on the testing system
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-10 09:56:14 +02:00
DL6ER 80093c9ebf Remove unused repo and update bats repo URL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 21:03:24 +02:00
DL6ER a3d75b3239 Use bats extension for test suite
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 21:02:14 +02:00
DL6ER 860c426cb2 Use sql extension for templte file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 21:01:03 +02:00
DL6ER e1286fe24c Use generic not arch-dependent binary name
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 18:51:32 +02:00
DL6ER 76fc40777e The variable CI is set to "true" on the CI system. Explicitly test against this string.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 10:25:08 +02:00
DL6ER f5d77dcf44 Create gravity.db from provided test data
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 10:08:14 +02:00
DL6ER 1821522dbe Use passed binary name for test and skip tests only if running on CI and binary name is not x86_64
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-08 10:05:45 +02:00
DL6ER dbe61c06da Also test against one domain from the gravity table
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 21:59:43 +02:00
DL6ER b6631c2fd1 Revive test suite
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 20:58:18 +02:00
DL6ER e4f686b6e3 Prepare pihole-FTL.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 19:41:48 +02:00
DL6ER efd774f13a Download prepared gravity database for using during tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 19:37:32 +02:00
DL6ER cf3ec632dc Bind to port 53
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 18:47:50 +02:00
DL6ER 7c0d828bb0 Print version of pihole-FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 18:45:24 +02:00
DL6ER cf328c0af4 Reimplement tests for CricleCI, step 1: Start pihole-FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-07 18:27:32 +02:00
DL6ER ce10699fb3 Use new customizable paths for Travis' tests. Fallback to searching for a local pihole-FTL.conf if none was found in the default locations
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-11-07 17:04:19 +01:00
Mcat12 595ab259ca Remove HTTP API specific code so it can be replaced with a new protocol
Adjusted tests to fit the current lack of output on the unix socket.
Added TELNET enum and used it in place of the old SOCKET to better fit
with the rest of the code base.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-01-03 20:16:50 -05:00
Mcat12 8adb3d335e Merge remote-tracking branch 'origin/development' into new/API
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-01-03 14:35:42 -05:00
Mcat12 604ad7ec39 Merge remote-tracking branch 'origin/development' into new/API
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>

# Conflicts:
#	request.c
#	test/test_suite.sh
2017-12-22 23:08:18 -05:00
DL6ER b61d035807 Update tests with new log format
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-21 16:15:34 +01:00
Mark Drobnak 95bdd62777 Merge pull request #167 from pi-hole/new/variablefilenames
Make long-term database location adjustable
2017-12-12 12:16:06 -05:00
DL6ER 49b229e51f Another modifications to the changed test
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-11 22:21:06 +01:00
DL6ER 7925a7755c Adjust test to include a mixed domain
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-11 22:16:31 +01:00
DL6ER 4da545e057 Tweaks for Travis automated testing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-12-07 22:20:34 +01:00
DL6ER f64251eb3f Merge branch 'development' into new/API 2017-08-07 11:00:20 +02:00
DL6ER 320e10f211 Adapt test suite as pi.hole is now an ignored domain (we will also check for that it does not appear anywhere in the statistics)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-07-20 20:34:40 +02:00
DL6ER 17a7823020 Merge branch 'development' into new/API 2017-06-18 10:31:22 +02:00
DL6ER 94def4a9c9 Extend test suite - expected to fail 2017-06-17 14:31:05 +02:00
DL6ER b2688bfd35 Add type variable to all request subroutines which can later be used to decide whether the output whould be in telnet format, or JSON (possibly even "v2" JSON) 2017-06-12 20:48:50 +02:00
DL6ER 0ef2256fa5 Test for both ports 4711 and 4747 before starting the tests 2017-06-12 20:28:46 +02:00
DL6ER d7d57a85a2 Show last two lines of FTL logs when waiting for socket to become ready 2017-06-12 20:10:47 +02:00
DL6ER 9fa2cfbf31 Prnt content of pihole-FTL.log 2017-06-12 12:11:30 +02:00
DL6ER 9c0776340d Print content of pihole.log when testing 2017-06-12 12:09:06 +02:00