forked from mtusi2026/mtusi2026lab7
Restart API and TLS namespaces together between failover scenarios
This commit is contained in:
@@ -33,7 +33,7 @@ def main():
|
||||
check('tests/resilience.py','--mode','persistence','--action-script','scripts/restart.'+ext,*opts,name='persistence')
|
||||
stopped=[]
|
||||
for i in range(6):
|
||||
docker('compose','stop','--timeout','2','api1-tls','api2-tls')
|
||||
docker('compose','stop','--timeout','2','api1-tls','api2-tls','api1','api2')
|
||||
docker('compose','start','api1','api2','api1-tls','api2-tls')
|
||||
ready_replicas(timeout=90)
|
||||
# The LB chooses the actual target; continue until both containers have
|
||||
@@ -46,7 +46,7 @@ def main():
|
||||
stopped.append(proof)
|
||||
(ROOT/'evidence'/('failover-'+str(i+1)+'-process.json')).write_text(json.dumps(proof,indent=2))
|
||||
if len({p['stopped_container'] for p in stopped})==2:break
|
||||
docker('compose','stop','--timeout','2','api1-tls','api2-tls')
|
||||
docker('compose','stop','--timeout','2','api1-tls','api2-tls','api1','api2')
|
||||
docker('compose','start','api1','api2','api1-tls','api2-tls');ready_replicas(timeout=90)
|
||||
assert len({p['stopped_container'] for p in stopped})==2,'Both tests selected same container; repeat second target explicitly'
|
||||
print('PASS: both distinct API containers failed over; all replicas restored',flush=True)
|
||||
|
||||
Reference in New Issue
Block a user