2019-02-15 04:01:36 +01:00
|
|
|
import os
|
2016-11-01 05:42:08 +01:00
|
|
|
import pytest
|
2016-11-02 04:32:36 +01:00
|
|
|
import re
|
2016-11-01 05:42:08 +01:00
|
|
|
|
2023-07-24 19:06:43 +02:00
|
|
|
CMD_APPLY_FTL_CONFIG_FROM_ENV = ". bash_functions.sh ; apply_FTL_Configs_From_Env"
|
2022-09-17 06:28:01 +02:00
|
|
|
|
2022-06-06 22:58:09 +02:00
|
|
|
|
2023-10-16 19:00:31 +02:00
|
|
|
@pytest.mark.parametrize("test_args", ['-e "FTLCONF_webserver.port=999"'])
|
2023-07-24 19:29:42 +02:00
|
|
|
def test_ftlconf_webserver_port(docker):
|
2023-07-24 19:06:43 +02:00
|
|
|
func = docker.run(CMD_APPLY_FTL_CONFIG_FROM_ENV)
|
|
|
|
assert "Applied pihole-FTL setting webserver.port=999" in func.stdout
|
2022-09-17 06:28:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize(
|
2023-10-16 19:00:31 +02:00
|
|
|
"test_args", ['-e "FTLCONF_dns.upstreams=1.1.1.1;8.8.8.8#1234"']
|
2022-09-17 06:28:01 +02:00
|
|
|
)
|
2023-07-24 19:29:42 +02:00
|
|
|
def test_ftlconf_dns_upstreams(docker):
|
2023-07-24 19:06:43 +02:00
|
|
|
func = docker.run(CMD_APPLY_FTL_CONFIG_FROM_ENV)
|
2022-09-17 06:28:01 +02:00
|
|
|
assert (
|
2023-07-24 19:06:43 +02:00
|
|
|
'Applied pihole-FTL setting dns.upstreams=["1.1.1.1","8.8.8.8#1234"]'
|
|
|
|
in func.stdout
|
2022-09-17 06:28:01 +02:00
|
|
|
)
|