Skip to content

Commit 58fcd1f

Browse files
authored
Merge pull request #1700 from pi-hole/test/FTLvv
Add test to output FTL's version information
2 parents 67bf23b + 4abe909 commit 58fcd1f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then FTLARCH=amd64; \
9696
&& if [ "${FTL_BRANCH}" = "master" ]; then URL="https://github.com/pi-hole/ftl/releases/latest/download"; else URL="https://ftl.pi-hole.net/${FTL_BRANCH}"; fi \
9797
&& curl -sSL "${URL}/pihole-FTL-${FTLARCH}" -o /usr/bin/pihole-FTL \
9898
&& chmod +x /usr/bin/pihole-FTL \
99-
&& readelf -h /usr/bin/pihole-FTL || (echo "Error with downloaded FTL binary" && exit 1)
99+
&& readelf -h /usr/bin/pihole-FTL || (echo "Error with downloaded FTL binary" && exit 1) \
100+
&& /usr/bin/pihole-FTL -vv
100101

101102
FROM base AS local-ftl-install
102103
# pihole-FTL must be built from source and copied to the src directory first!

test/tests/test_general.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ def test_pihole_gid_env_var(docker):
1212
func = docker.run("id -g pihole")
1313
assert "456" in func.stdout
1414

15+
def test_pihole_ftl_version(docker):
16+
func = docker.run("pihole-FTL -vv")
17+
assert func.rc == 0
18+
assert "Version:" in func.stdout
1519

1620
# Wait 5 seconds for startup, then kill the start.sh script
1721
# Finally, grep the FTL log to see if it has been shut down cleanly

0 commit comments

Comments
 (0)