forked from mtusi2026/mtusi2026lab2
fix migrations
This commit is contained in:
+13
-1
@@ -3,6 +3,7 @@
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
import uuid
|
||||
@@ -55,7 +56,18 @@ def main():
|
||||
check(len(observed)>=2,'less than two API instances observed before failure; verify LB/session affinity')
|
||||
print('Executing explicit '+args.mode+' hook; hook output suppressed to avoid leaking secrets.')
|
||||
# No shell interpolation and no Docker commands in this test.
|
||||
proc = subprocess.Popen([str(script)],env=env,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
command = [str(script)]
|
||||
if os.name == 'nt' and script.suffix.lower() == '.sh':
|
||||
interpreter = shutil.which('sh')
|
||||
if interpreter is None:
|
||||
git = shutil.which('git')
|
||||
if git is not None:
|
||||
candidate = Path(git).resolve().parents[1] / 'bin' / 'bash.exe'
|
||||
if candidate.is_file():
|
||||
interpreter = str(candidate)
|
||||
check(interpreter is not None,'sh interpreter is required to run the action script on Windows')
|
||||
command = [interpreter,str(script)]
|
||||
proc = subprocess.Popen(command,env=env,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
started = time.monotonic()
|
||||
successes,failures,after_instances = [],0,[]
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user