Commit Graph

35 Commits

Author SHA1 Message Date
Adam Warner 611df9b3f0
Huge tidy up/prune/refactor of the code
- Moves most code in start.sh into functions in bash_functions.sh
- Removes code from 20-start.sh and moves it inside start.sh
- Removes unused variables and code, making it easier to find our way around
- Removes dependency on webpage.sh, which had to be modified in order to source it properly (thus breaking pihole checkout), use utils.sh instead
- Replaces all uses of ServerIP/v6 with new FTLCONF_REPLY_ADDR4/6 variables
- No need to symlink echo to whiptail any more (probably hasn't been needed for a while)
- removes huge list of exported env vars at the top of start.sh - no longer appear to be needed
- rename some functions in bash_functions to more logical names, group their usages in start.sh
- adjust/fix tests to match changes
- remove some dead tests

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-11 23:50:05 +01:00
Adam Warner b3717000ae
Address Sonar rules S117 (https://rules.sonarsource.com/python/RSPEC-117) and S1542(https://rules.sonarsource.com/python/RSPEC-1542) in all test .py files
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:26:47 +01:00
Adam Hill 3765d41b5c Update way too much
- Tox py3.7 + pipenv
- Python3 Dockerfile.py
- Dockerfile.py tags remote instead of just local image names now
- Circle.sh instead of in-line circle.yml script breakout
- probably other stuff I forgot
- Docker images build during the tests should hopefullly now be available at the deploy job workflow thanks to shared docker layers.
- Rename aarch64 to arm64 to reduce custom map
2020-01-30 20:26:57 -06:00
cclauss 6987b36981 Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-08-31 22:07:13 +02:00
Adam Hill fca7769b33
remove ServerIP requirement, simpler example commands
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-07 19:51:15 -06:00
Adam Hill d6642fc191
broken test (works outside tests), not required for release
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 11:45:40 -06:00
Adam Hill d3309ebb1a
remove old blocking page setup/test
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-21 22:43:38 -06:00
Adam Hill 65a1ac7f1e
grab version on startup for web footer. 2 tests stablized
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 18:20:55 -05:00
Adam Hill 999f02b598
start of fixing race condition by not having test+s6 both run /start.sh
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 18:13:25 -05:00
diginc 3bcdd27cb9 fix ipv6 test 2018-01-04 22:30:40 -06:00
diginc b33ea3b77f fixed the tests 2018-01-03 21:35:53 -06:00
diginc 615af98eab delete all the alpine 2018-01-03 20:09:47 -06:00
diginc d9fa9b1016 alpine 3.2 startup tests fixed, web still failing 2017-12-11 10:28:15 -06:00
diginc 7c6c48e133 rest of loading tests fixed, undo heredoc tab2space 2017-12-07 23:39:34 -06:00
diginc 988e17be7a some of the debian_amd64 load_as_expected tests fixed, tab2spaces 2017-12-07 23:30:54 -06:00
diginc c9b08e8848 documenting and validating the Server IP env vars 2017-05-19 00:36:53 -05:00
diginc b9095bc123 This commit is too big, but it works
* Tests are passing, hopefully consistently
* FTL pulling from official releases
  * thanks @DL6ER for the musl-libc build
* Thanks middleagedman for the IPv6 fixes
* Thanks everyone for patience while I get this release working!
2017-05-13 17:03:24 -05:00
diginc d528878bac test passing...travis virtual environment is another story 2017-01-11 20:12:56 -06:00
diginc 136f43a995 various test fixes 2017-01-10 20:38:42 -06:00
diginc cc1c7a745d resolving alpine+nginx issues 2017-01-08 23:43:12 -06:00
diginc f9bb0c976a add pihole enable/disable tests 2016-11-06 15:12:11 -06:00
diginc 6ec264e3b6 rename/clarify test and move RunningPiHole to global py.test scope 2016-11-06 13:40:24 -06:00
diginc eddba93537 split out the bash function tests to own file 2016-10-31 23:42:08 -05:00
diginc 99c4921a84 common_start.sh now bash_functions.sh, dnsmasq test clarified 2016-10-30 13:47:06 -05:00
diginc c9468eaabd Pi-hole and Web versions update + new stuff
* New code in shell scripts required killing systemctl in images
* Added tests for the quick IPv6 env hack I made a while back
* Stopped requiring the need for update.sh to copy gravity for alpine
 * (moved modifications to dockerfile)
* One step closer to unified start script for both OS versions
* Optimzed some test code
2016-10-20 22:44:44 -05:00
diginc 34419c5631 do not need these prints any more 2016-10-08 13:40:36 -05:00
diginc 61da6ce0ad fixes #55 DNS1 & DNS2 bug
- tests now watch for regression in these ENV var's behavior
- use local scope in function instead of exported for easier testing
2016-10-08 13:34:25 -05:00
diginc 1e6eda27eb Persistent dig container running dns tests
* Sidekick to pi-hole links and queries DNS
* Lookup the default pi.hole against what was fed in as ServerIP
* Lookup a couple outside popular static DNS servers hostnames too
* a little pre-optimized to persist the dig container since docker start adds half a second (no virtually nothing for digs)
2016-09-07 23:07:38 -05:00
diginc e8cb52b23a ipv6 tests I skipped the other night 2016-09-07 20:39:01 -05:00
diginc da44042bd4 fixed problem with nginx admin, added test! 2016-08-28 02:01:48 -05:00
diginc 30fe0a3353 Added more http endpoint tests
Forgot to uncomment these, revealed a flaw in the nginx config
nginx now has parity with lighttpd for pages it returns and return codes
2016-08-28 01:13:04 -05:00
diginc 3b74e8d3e3 Tests working again, along with persistent tests with an actual running pi-hole container 2016-08-28 00:45:26 -05:00
diginc d40ee18689 Refactor testinfra docker to support parametrize
This accomplishes the same thing as the previous tests, without using testinfra docker's boilerplate example, which had some drawbacks: Adding @parametrize to the previous version didn't allow overriding the pytest.mark docker arg, image:tag, or cmd with a parametrized test containing different expected results associated with either the alpine/debian tag.  Isntead it'd run all the parameters against both tags...e.g. nginx and lighttpd test would run agains both alpine and docker when parametizing on the test level.
2016-08-02 23:32:51 -05:00
diginc 4225e4cd7c remove a few unecessary lines 2016-07-16 16:02:49 -05:00
diginc b3879c8729 Fix to debian lighttpd php config #19 w/tests 2016-07-16 16:00:20 -05:00