1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Cap the variables and echo out the proper environment.

This commit is contained in:
Dan Schaper 2016-11-02 08:22:45 -07:00
parent fef9ab674e
commit e99ef9c093

View File

@ -2,11 +2,11 @@ import pytest
from textwrap import dedent from textwrap import dedent
SETUPVARS = { SETUPVARS = {
'piholeInterface' : 'eth99', 'PIHOLE_INTERFACE' : 'eth99',
'IPv4_address' : '1.1.1.1', 'IPV4_ADDRESS' : '1.1.1.1',
'IPv6_address' : '2:2:2:2:2:2', 'IPV6_ADDRESS' : 'FE80::240:D0FF:FE48:4672',
'piholeDNS1' : '4.2.2.1', 'PIHOLE_DNS1' : '4.2.2.1',
'piholeDNS2' : '4.2.2.2' 'PIHOLE_DNS2' : '4.2.2.2'
} }
def test_setupVars_are_sourced_to_global_scope(Pihole): def test_setupVars_are_sourced_to_global_scope(Pihole):
@ -23,11 +23,11 @@ def test_setupVars_are_sourced_to_global_scope(Pihole):
printSetupVars() { printSetupVars() {
# Currently debug test function only # Currently debug test function only
echo "Outputting sourced variables" echo "Outputting sourced variables"
echo "PIHOLE_INTERFAC=\${piholeInterface}" echo "PIHOLE_INTERFACE=\${PIHOLE_INTERFACE}"
echo "IPv4_ADDRESS=\${IPv4_address}" echo "IPv4_ADDRESS=\${IPv4_ADDRESS}"
echo "IPv6_ADDRESS=\${IPv6_address}" echo "IPv6_ADDRESS=\${IPv6_ADDRESS}"
echo "PIHOLE_DNS1=\${piholeDNS1}" echo "PIHOLE_DNS1=\${PIHOLE_DNS1}"
echo "PIHOLE_DNS2=\${piholeDNS2}" echo "PIHOLE_DNS2=\${PIHOLE_DNS2}"
} }
update_dialogs() { update_dialogs() {
. /etc/pihole/setupVars.conf . /etc/pihole/setupVars.conf