Skip to content

Commit c1d59d0

Browse files
committed
Remove in-the-past test scaffolding
1 parent 4aa2a57 commit c1d59d0

File tree

4 files changed

+6
-47
lines changed

4 files changed

+6
-47
lines changed

start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
if not startservers.install(race_detection=False):
2121
raise(Exception("failed to build"))
2222

23-
if not startservers.start(fakeclock=None):
23+
if not startservers.start():
2424
sys.exit(1)
2525
try:
2626
os.wait()

test/helpers.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -154,29 +154,6 @@ def verify_akamai_purge():
154154
break
155155
reset_akamai_purges()
156156

157-
twenty_days_ago_functions = [ ]
158-
159-
def register_twenty_days_ago(f):
160-
"""Register a function to be run during "setup_twenty_days_ago." This allows
161-
test cases to define their own custom setup.
162-
"""
163-
twenty_days_ago_functions.append(f)
164-
165-
def setup_twenty_days_ago():
166-
"""Do any setup that needs to happen 20 day in the past, for tests that
167-
will run in the 'present'.
168-
"""
169-
for f in twenty_days_ago_functions:
170-
f()
171-
172-
six_months_ago_functions = []
173-
174-
def register_six_months_ago(f):
175-
six_months_ago_functions.append(f)
176-
177-
def setup_six_months_ago():
178-
[f() for f in six_months_ago_functions]
179-
180157
def waitport(port, prog, perTickCheck=None):
181158
"""Wait until a port on localhost is open."""
182159
for _ in range(1000):

test/integration-test.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,7 @@ def main():
7373
if not startservers.install(race_detection=race_detection):
7474
raise(Exception("failed to build"))
7575

76-
if not args.test_case_filter:
77-
now = datetime.datetime.utcnow()
78-
79-
six_months_ago = now+datetime.timedelta(days=-30*6)
80-
if not startservers.start(fakeclock=fakeclock(six_months_ago)):
81-
raise(Exception("startservers failed (mocking six months ago)"))
82-
setup_six_months_ago()
83-
startservers.stop()
84-
85-
twenty_days_ago = now+datetime.timedelta(days=-20)
86-
if not startservers.start(fakeclock=fakeclock(twenty_days_ago)):
87-
raise(Exception("startservers failed (mocking twenty days ago)"))
88-
setup_twenty_days_ago()
89-
startservers.stop()
90-
91-
if not startservers.start(fakeclock=None):
76+
if not startservers.start():
9277
raise(Exception("startservers failed"))
9378

9479
if args.run_chisel:

test/startservers.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,14 @@ def install(race_detection):
191191

192192
return subprocess.call(["/usr/bin/make", "GO_BUILD_FLAGS=%s" % go_build_flags]) == 0
193193

194-
def run(cmd, fakeclock):
194+
def run(cmd):
195195
e = os.environ.copy()
196196
e.setdefault("GORACE", "halt_on_error=1")
197-
if fakeclock:
198-
e.setdefault("FAKECLOCK", fakeclock)
199197
p = subprocess.Popen(cmd, env=e)
200198
p.cmd = cmd
201199
return p
202200

203-
def start(fakeclock):
201+
def start():
204202
"""Return True if everything builds and starts.
205203
206204
Give up and return False if anything fails to build, or dies at
@@ -229,7 +227,7 @@ def start(fakeclock):
229227
print("Starting service", service.name)
230228
try:
231229
global processes
232-
p = run(service.cmd, fakeclock)
230+
p = run(service.cmd)
233231
processes.append(p)
234232
if service.grpc_port is not None:
235233
waithealth(' '.join(p.args), service.grpc_port, service.host_override)
@@ -289,8 +287,7 @@ def startChallSrv():
289287
'--management', ':8055',
290288
'--http01', '64.112.117.122:80',
291289
'-https01', '64.112.117.122:443',
292-
'--tlsalpn01', '64.112.117.134:443'],
293-
None)
290+
'--tlsalpn01', '64.112.117.134:443'])
294291
# Wait for the chall-test-srv management port.
295292
if not waitport(8055, ' '.join(challSrvProcess.args)):
296293
return False

0 commit comments

Comments
 (0)