From 8ece19132d0edada1d6766ff8b630adce480a61b Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Sat, 2 Feb 2019 12:58:59 -0600 Subject: [PATCH] deploy support for RCs, fix enable test Signed-off-by: Adam Hill --- deploy_docker.sh | 2 +- test/test_pihole_scripts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy_docker.sh b/deploy_docker.sh index 62c1a67..1501dcb 100755 --- a/deploy_docker.sh +++ b/deploy_docker.sh @@ -45,7 +45,7 @@ if [[ "$version" == 'unset' ]]; then echo "Version number var is unset and master branch needs a version...pass in \$version variable!" exit 1 elif [[ "$branch" = "release/"* ]]; then - version="$(echo $branch | grep -Po 'v[\d\.-]*')" + version="$(echo $branch | grep -Po 'v[\d\w\.-]*')" echo "Version number is being taken from this release branch $version" else version="$branch" diff --git a/test/test_pihole_scripts.py b/test/test_pihole_scripts.py index b315617..39fcfe9 100644 --- a/test/test_pihole_scripts.py +++ b/test/test_pihole_scripts.py @@ -32,7 +32,7 @@ def RunningPiHole(DockerPersist, Slow, persist_webserver, persist_tag, start_cmd @pytest.mark.parametrize('start_cmd,hostname,expected_ip, expected_messages', [ - ('enable', 'pi.hole', '127.0.0.1', ['Enabling blocking','Pi-hole Enabled']), + ('enable', 'pi.hole', '127.0.0.1', ['Blocking already enabled,','nothing to do']), ('disable', 'pi.hole', '127.0.0.1', ['Disabling blocking','Pi-hole Disabled']), ]) def test_pihole_enable_disable_command(RunningPiHole, Dig, persist_tag, start_cmd, hostname, expected_ip, expected_messages):