Skip to content

Commit

Permalink
Merge pull request #149 from diginc/dev
Browse files Browse the repository at this point in the history
3.1 release
  • Loading branch information
diginc authored Jun 24, 2017
2 parents 3da2764 + 0389309 commit 844df6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ There are other environment variables if you want to customize various things in
| `-e INTERFACE=<NIC>`<br/> *Advanced/Optional* | The default works fine with our basic example docker run commands. If you're trying to use DHCP with `--net host` mode then you may have to customize this or DNSMASQ_LISTENING.
| `-e DNSMASQ_LISTENING=<local\|all\|NIC>`<br/> *Advanced/Optional* | `local` listens on all local subnets, `all` permits listening on internet origin subnets in addition to local.

Here is a rundown of the other arguments passed into the recommended
Here is a rundown of the other arguments passed into the example `docker run`

| Docker Arguments | Description |
| ---------------- | ----------- |
| `-p 80:80`<br/>`-p 53:53/tcp -p 53:53/tcp`<br/> **Recommended** | Ports to expose, the bare minimum ports required for pi-holes HTTP and DNS services
| `-p 80:80`<br/>`-p 53:53/tcp -p 53:53/udp`<br/> **Recommended** | Ports to expose, the bare minimum ports required for pi-holes HTTP and DNS services
| `--restart=always`<br/> **Recommended** | Automatically (re)start your pihole on boot or in the event of a crash
| `-v /dir/for/pihole:/etc/pihole`<br/> **Recommended** | Volumes for your pihole configs help persist changes across docker image updates
| `-v /dir/for/dnsmasq.d:/etc/dnsmasq.d`<br/> **Recommended** | Volumes for your dnsmasq configs help persist changes across docker image updates
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash -ex
mkdir -p /etc/pihole/
export CORE_TAG='v3.0.1'
export WEB_TAG='v3.0.1'
export FTL_TAG='v2.7.3'
export CORE_TAG='v3.1'
export WEB_TAG='v3.1'
export FTL_TAG='v2.9.4'

# Make pihole scripts fail searching for `systemctl`,
# which fails pretty miserably in docker compared to `service`
Expand Down
12 changes: 6 additions & 6 deletions test/test_pihole_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def test_pihole_start_cmd(RunningPiHole, start_cmd, persist_tag):
''' the start_cmd tests are all built into the RunningPiHole fixture in this file '''
assert RunningPiHole.cmd.stdout == START_DNS_STDOUT[persist_tag]

@pytest.mark.parametrize('start_cmd,hostname,expected_ip', [
('enable', 'pi.hole', '127.0.0.1'),
('disable', 'pi.hole', '127.0.0.1'),
@pytest.mark.parametrize('start_cmd,hostname,expected_ip, expected_message', [
('enable', 'pi.hole', '127.0.0.1', 'enabled'),
('disable 0', 'pi.hole', '127.0.0.1', 'disabled'),
])
def test_pihole_start_cmd(RunningPiHole, Dig, persist_tag, start_cmd, hostname, expected_ip):
def test_pihole_start_cmd(RunningPiHole, Dig, persist_tag, start_cmd, hostname, expected_ip, expected_message):
''' the start_cmd tests are all built into the RunningPiHole fixture in this file '''
dig_cmd = "dig +time=1 +noall +answer {} @test_pihole | awk '{{ print $5 }}'".format(hostname)
lookup = RunningPiHole.dig.run(dig_cmd).stdout.rstrip('\n')
assert lookup == expected_ip

stdout = "::: Blocking has been {}d!\n".format(start_cmd)
assert RunningPiHole.cmd.stdout == stdout
stdout = "::: Blocking has been {}!\n".format(expected_message)
assert stdout in RunningPiHole.cmd.stdout

0 comments on commit 844df6a

Please sign in to comment.