mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
chore: Tweak environment variables in example tests
This commit is contained in:
parent
cd1fdd9ac4
commit
8e36df79b8
5 changed files with 12 additions and 2 deletions
|
|
@ -56,6 +56,10 @@ class AutoconfTest(Test):
|
|||
if "AUTO_LETS_ENCRYPT=yes" not in data["services"]["bunkerweb"]["environment"]:
|
||||
data["services"]["bunkerweb"]["environment"].append("AUTO_LETS_ENCRYPT=yes")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_LETS_ENCRYPT_STAGING=yes")
|
||||
data["services"]["bunkerweb"]["environment"].append("LOG_LEVEL=info")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_BUNKERNET=no")
|
||||
data["services"]["bunkerweb"]["environment"].append("SEND_ANONYMOUS_REPORT=no")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_DNSBL=no")
|
||||
with open(compose, "w") as f:
|
||||
f.write(dump(data))
|
||||
proc = run(
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class DockerTest(Test):
|
|||
Test.replace_in_file(
|
||||
compose,
|
||||
r"AUTO_LETS_ENCRYPT=yes",
|
||||
"AUTO_LETS_ENCRYPT=yes\n - USE_LETS_ENCRYPT_STAGING=yes\n - LOG_LEVEL=info",
|
||||
"AUTO_LETS_ENCRYPT=yes\n - USE_LETS_ENCRYPT_STAGING=yes\n - LOG_LEVEL=info\n - USE_BUNKERNET=no\n - SEND_ANONYMOUS_REPORT=no\n - USE_DNSBL=no",
|
||||
)
|
||||
Test.replace_in_file(compose, r"DISABLE_DEFAULT_SERVER=yes", "DISABLE_DEFAULT_SERVER=no")
|
||||
for ex_domain, test_domain in self._domains.items():
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ class KubernetesTest(Test):
|
|||
"REAL_IP_FROM": "100.64.0.0/10 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8",
|
||||
"REAL_IP_HEADER": "proxy_protocol",
|
||||
"LOG_LEVEL": "info",
|
||||
"USE_BUNKERNET": "no",
|
||||
"SEND_ANONYMOUS_REPORT": "no",
|
||||
"USE_DNSBL": "no",
|
||||
}
|
||||
replace_env = {"API_WHITELIST_IP": "127.0.0.1/8 100.64.0.0/10 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8"}
|
||||
for yaml in data:
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class LinuxTest(Test):
|
|||
raise Exception("docker exec cp variables.env failed (test)")
|
||||
proc = self.docker_exec(
|
||||
self.__distro,
|
||||
"echo '' >> /etc/bunkerweb/variables.env ; echo 'USE_LETS_ENCRYPT_STAGING=yes' >> /etc/bunkerweb/variables.env ; echo 'LOG_LEVEL=info' >> /etc/bunkerweb/variables.env",
|
||||
"echo '' >> /etc/bunkerweb/variables.env ; echo 'USE_LETS_ENCRYPT_STAGING=yes' >> /etc/bunkerweb/variables.env ; echo 'LOG_LEVEL=info' >> /etc/bunkerweb/variables.env ; echo 'USE_BUNKERNET=no' >> /etc/bunkerweb/variables.env ; echo 'SEND_ANONYMOUS_REPORT=no' >> /etc/bunkerweb/variables.env ; echo 'USE_DNSBL=no' >> /etc/bunkerweb/variables.env",
|
||||
)
|
||||
if proc.returncode != 0:
|
||||
raise (Exception("docker exec append variables.env failed (test)"))
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ class SwarmTest(Test):
|
|||
data["services"]["bunkerweb"]["environment"].append("AUTO_LETS_ENCRYPT=yes")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_LETS_ENCRYPT_STAGING=yes")
|
||||
data["services"]["bunkerweb"]["environment"].append("LOG_LEVEL=info")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_BUNKERNET=no")
|
||||
data["services"]["bunkerweb"]["environment"].append("SEND_ANONYMOUS_REPORT=no")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_DNSBL=no")
|
||||
del data["services"]["bunkerweb"]["deploy"]["placement"]
|
||||
with open(compose, "w") as f:
|
||||
f.write(dump(data))
|
||||
|
|
|
|||
Loading…
Reference in a new issue