Skip to content

Commit b16e788

Browse files
jshacpu
authored andcommitted
Make chisel2 more adaptable. (letsencrypt#3350)
This makes it easier to use in testing the staging server.
1 parent f6d9931 commit b16e788

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/chisel2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
logger.setLevel(int(os.getenv('LOGLEVEL', 0)))
3838

3939
DIRECTORY = os.getenv('DIRECTORY', 'http://localhost:4001/directory')
40-
ACCEPTABLE_TOS = "https://boulder:4431/terms/v7"
40+
ACCEPTABLE_TOS = os.getenv('ACCEPTABLE_TOS',"https://boulder:4431/terms/v7")
41+
PORT = os.getenv('PORT', '5002')
4142

4243
# URLs to control dns-test-srv
4344
SET_TXT = "http://localhost:8055/set-txt"
@@ -163,7 +164,7 @@ def cleanup():
163164
return cleanup
164165

165166
def do_http_challenges(client, authzs):
166-
port = 5002
167+
port = int(PORT)
167168
challs = [get_chall(a, challenges.HTTP01) for a in authzs]
168169
answers = set([http_01_answer(client, c) for c in challs])
169170
server = standalone.HTTP01Server(("", port), answers)

0 commit comments

Comments
 (0)