Commit Graph

202 Commits

Author SHA1 Message Date
Christian König 5f8ca1822f
Re-add importand comment line
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-17 13:42:19 +01:00
Christian König 59cfc75ae7
Remove pipenv and allow pip to install systemwide with --break-system-packages
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-17 13:38:35 +01:00
Christian König 775c3a8049 Update docker-cli also to v3.19
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-16 23:23:21 +01:00
Christian König dbf3ddfa24 Update alpine to 3.19
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-16 23:23:21 +01:00
dependabot[bot] 0290369f34
Bump black from 23.11.0 to 23.12.0 in /test
Bumps [black](https://github.com/psf/black) from 23.11.0 to 23.12.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.11.0...23.12.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-16 10:18:26 +00:00
dependabot[bot] 6842f000c1
Bump pytest-xdist from 3.4.0 to 3.5.0 in /test
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-25 10:05:19 +00:00
dependabot[bot] cb38658a93
Bump black from 23.10.1 to 23.11.0 in /test
Bumps [black](https://github.com/psf/black) from 23.10.1 to 23.11.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.10.1...23.11.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-18 10:49:49 +00:00
dependabot[bot] 69f06b85bb
Bump pytest-xdist from 3.3.1 to 3.4.0 in /test
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.3.1 to 3.4.0.
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-18 10:46:00 +00:00
dependabot[bot] 022c0cc953
Bump pytest-testinfra from 9.0.0 to 10.0.0 in /test
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 9.0.0 to 10.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/9.0.0...10.0.0)

---
updated-dependencies:
- dependency-name: pytest-testinfra
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-18 10:08:58 +00:00
dependabot[bot] a651b0bfab
Bump pytest from 7.1.3 to 7.4.3 in /test
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.3 to 7.4.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.3...7.4.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 17:46:30 +00:00
dependabot[bot] cecdae4dbd
Bump pytest-xdist from 2.5.0 to 3.3.1 in /test
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 2.5.0 to 3.3.1.
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.5.0...v3.3.1)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 17:42:04 +00:00
dependabot[bot] ae85a85d12
Bump pytest-testinfra from 6.8.0 to 9.0.0 in /test
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 6.8.0 to 9.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/6.8.0...9.0.0)

---
updated-dependencies:
- dependency-name: pytest-testinfra
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 17:26:35 +00:00
dependabot[bot] 822a9c515e
Bump black from 22.8.0 to 23.10.1 in /test
Bumps [black](https://github.com/psf/black) from 22.8.0 to 23.10.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.8.0...23.10.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 21:15:01 +00:00
Christian König f31b4694c8
Delimter for array type FTLCONF_ values is ;
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-29 20:55:41 +00:00
Adam Warner 5c7ff5c539
TARGETPLATFORM needs to be set
Co-authored-by: yubiuser <ckoenig@posteo.de>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-10-22 22:14:31 +01:00
Adam Warner b8a717f925
Re-do tests to account for FTLCONF_ changes. Add new tests for web password
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-10-22 17:42:29 +01:00
Adam Warner 374f6f2537
Add in a test to kill start.sh and then ensure that pihole-FTL is gracefully exited.
We add in some sleeps to ensure that the log file is being written to before we check it
Log entry tests are based on many different passes of running this locally with all sorts of timeouts and sleeps, this seems to be the most consistent

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 23:31:39 +01:00
Adam Warner b41d50b94f
Remove volume mount from tests, this causes issues with gravity not being able to read an adlist file symlinked to /dev/null
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 22:57:35 +01:00
Adam Warner b56b8d03c4
black formatted some tests
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 21:18:10 +01:00
Adam Warner f09b0d68bb
Add tests for UID/GID switching
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-26 08:31:29 +01:00
Adam Warner 4c8f4613dd
test names should match the regular expression ^[a-z_][a-z0-9_]*$. Apparently
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:37:46 +01:00
Adam Warner 1202dafcbd
Change test dockerfile base to `docker:24.0.4-cli-alpine3.18` rather than copying in, buildx would not work the other way.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:37:37 +01:00
Adam Warner 3208c4042d
Strip out no longer relevant tests/test fixtures (persist_docker, for example has not been used in a long time) , begin building test library from ground up.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:11:33 +01:00
Adam Warner 6b5332be47
- Change test dockerfile base to alpine, too (Alpine all the things!)
- Tweak build-and-test.sh to allow tests to run against more platforms using buildx
- Split GHA out into two seperate files. One for tests on pull requests, another for build and merge on push to `development-v6` (add other branches in later)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:11:33 +01:00
Nathan Gaberel 54d179c24b
Bind lighttpd to $WEB_BIND_ADDR by default.
Signed-off-by: Nathan Gaberel <nathan@gnab.fr>
2023-01-21 18:06:05 -08:00
RD WebDesign 8872c2b393
Fix config filename on the test
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-01-15 17:50:28 -03:00
Adam Warner b723874623
Don't need to see all the images on the system
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-01-06 18:57:09 +00:00
Daniel 4da66313f4
Remove old test dependencies, updated ones still being used. Introduce Black formatter 2022-09-17 04:28:01 +00:00
Adam Warner 97f81bae21
Shuffle some files around, change dependencies to make output clearer, change ::: for [i] to further clarify output.
Allow for  PH_VERBOSE to set -x on all scripts that it would be useful for

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 13:17:22 +01:00
Adam Warner 473117e8a8
Rename start and gravity scripts to match their service names
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:50:19 +01:00
Adam Warner e6d4c3091f
Move all scripts to /usr/local/bin to simplify dockerfile
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:48:07 +01:00
Adam Warner cbd86caa5b
Merge pull request #1170 from pi-hole/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.25.9 to 1.26.5
2022-08-25 21:50:26 +01:00
Adam Warner cb38190b50
FTLCONF_REPLY_ADDR4/6 are now deprecated. Use FTLCONF_LOCAL_IPV4/6 instead
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-22 21:42:29 +01:00
dependabot[bot] 33966f8eb2
Bump urllib3 from 1.25.9 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.9 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.9...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-21 19:32:22 +00:00
Adam Warner e75e3800a2
make sure that setup_FTL_ProcessDNSSettings is the last thing called, else user set environment variables will be overridden when it sources setupVars.conf
Some additional tweaks
2022-07-19 18:22:49 +01:00
Adam Warner 1d59f257ff
Reorganise the repository
Simplify the test suite now that we use buildx to build the final image
Remove tests that were never run/skipped in previous runs (same number of tests passing as were before)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-15 17:43:09 +01:00
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 f17898bf6f
Also account for /var/log/lighttpd file name changes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-12 13:37:39 +01:00
Adam Warner cb16942096
Address Sonar rules S125 (https://rules.sonarsource.com/python/RSPEC-125) and S1481 (https://rules.sonarsource.com/python/RSPEC-1481)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 22:04:44 +01:00
Adam Warner 29f81fcfbc
Address Sonar rule S1192 (https://rules.sonarsource.com/python/RSPEC-1192)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:58:09 +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 Warner 64e449c133
fix [this code smell](https://sonarcloud.io/project/issues?pullRequest=1106&issues=AYE6byrIbM3H9G6ifn9K&open=AYE6byrIbM3H9G6ifn9K&id=pi-hole_docker-pi-hole)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:26:26 +01:00
Adam Warner 6b9a4e6216
Fix up tests to work with new logic
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:14:26 +01:00
Adam Warner ad9d7cb710
Merge pull request #1084 from lightswitch05/feature/update-default-debian-to-bullseye
Update default debian to bullseye. Update README to describe docker tags.
2022-05-04 18:20:26 +01:00
Daniel 08627a1ba7
Update everything to use bullseye as the default debian version 2022-05-02 22:36:59 -04:00
Daniel f1c5662265
Minor bugfixes per SonarCloud results 2022-05-02 21:44:33 -04:00
Adam Warner e1dc289d7d
Fix suggested spelling mistakes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-22 17:41:29 +01:00
Adam Warner 4cc3587084
adjustment to custom interface tests to reflect new default behaviour in https://github.com/pi-hole/pi-hole/pull/4509
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-05 22:47:16 +00:00
Phill b0a5a0f163
Trailing slashes on volumes fail on newer versions of docker-compose (#949)
* Trailing slashes on volumes fail on newer versions of docker-compose

See [Issue 947](https://github.com/pi-hole/docker-pi-hole/issues/947)
for the background.

This PR proposes removing trailing slashes from all documentation,
examples and scripts.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
2021-12-11 13:37:18 +00:00
Adam Warner 9a9ee41a45
- Replace PIHOLE_VERSION with PIHOLE_DOCKER_TAG
- reorder some stuff in the main Dockerfile
- Remove the CORE/WEB/FTL_VERSION args/env vars
- tweaks to GHA build script after some hints from @crazy-max
- always checkout dev versions of Pi-hole for nightly build, also make sure we're using dev branch of this repo
- keep pihole checkout enabled for dev and nightly tags

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-10 20:51:35 +00:00