Skip to content

Commit f886ea0

Browse files
committed
chore(tests): bit more work on global http proxy; formatting
1 parent 9cbb659 commit f886ea0

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

tests/integration/conftest.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@
22
import os
33
from .lib import startContainer, get_free_port, DOCKER_GW_IP
44

5-
@pytest.fixture(autouse=True, scope='session')
5+
6+
@pytest.fixture(autouse=True, scope="session")
67
def my_fixture():
78
# setup_stuff
89
print("session start")
910

11+
# newCache = not os.getenv("DDA_https_proxy")
1012
newCache = False
1113

1214
if newCache:
13-
squid_port = get_free_port()
14-
http_port = get_free_port()
15-
container, stop = startContainer(
16-
"gadicc/squid-ssl-zero",
17-
ports={3128:squid_port},
18-
)
19-
os.environ["DDA_http_proxy"] = f"http://{DOCKER_GW_IP}:{squid_port}"
20-
os.environ["DDA_https_proxy"] = os.environ["DDA_http_proxy"]
15+
squid_port = get_free_port()
16+
http_port = get_free_port()
17+
container, stop = startContainer(
18+
"gadicc/squid-ssl-zero",
19+
ports={3128: squid_port, 3129: http_port},
20+
)
21+
os.environ["DDA_http_proxy"] = f"http://{DOCKER_GW_IP}:{squid_port}"
22+
os.environ["DDA_https_proxy"] = os.environ["DDA_http_proxy"]
23+
# TODO, code in getDDA to download cert
2124

2225
yield
2326
# teardown_stuff
2427
print("session end")
2528
if newCache:
26-
stop()
29+
stop()

0 commit comments

Comments
 (0)