-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_dev_servers.py
More file actions
69 lines (47 loc) · 1.5 KB
/
Copy pathrun_dev_servers.py
File metadata and controls
69 lines (47 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
"""
quick utility script
leverages the test framework to start/manage a few background subprocess:
* pebble
* pebble_alt
* acme_dns
Run this as a normal user with the relevant ENV vars.
acme_dns will request an admin password to bind to port 53
"""
# stdlib
import os
import time
# locals
import tests._utils
from tests._utils import under_acme_dns
from tests._utils import under_pebble
from tests._utils import under_pebble_alt
# ==============================================================================
RUN_API_TESTS__PEBBLE = bool(int(os.environ.get("SSL_RUN_API_TESTS__PEBBLE", 0)))
PEBBLE_REAL_CHALLENGES = bool(int(os.environ.get("PEBBLE_REAL_CHALLENGES", 0)))
if not RUN_API_TESTS__PEBBLE:
print("env var `SSL_RUN_API_TESTS__PEBBLE=1` must be set")
exit(1)
print("PEBBLE_REAL_CHALLENGES", PEBBLE_REAL_CHALLENGES)
def run():
print("Spinning up services...")
@under_acme_dns
def _acme_dns():
print("Running: acme_dns")
@under_pebble
def _pebble():
print("Running: pebble")
@under_pebble_alt
def _pebble_alt():
print("Running: pebble_alt")
while True:
print("running...")
time.sleep(60)
print("Starting: pebble_alt")
_pebble_alt()
print("Starting: pebble")
_pebble()
print("Starting: acme_dns")
_acme_dns()
tests._utils.TEST_INI = "data_development/config.ini"
tests._utils.intialize_appsettings()
run()