ЛР4: MinIO, вложения и reconciler на оценку 5

This commit is contained in:
R0flyan
2026-10-30 20:52:21 +03:00
parent ec540a1a72
commit a0de6968e3
85 changed files with 6425 additions and 48 deletions
+25
View File
@@ -0,0 +1,25 @@
"""Run private Go tests in a temporary source copy; public files stay untouched."""
from pathlib import Path
import shutil
import subprocess
import sys
import tempfile
ROOT=Path(__file__).resolve().parents[1]
def main():
subprocess.run([sys.executable, '-X', 'utf8', str(ROOT/'student-tests/readiness_test.py')], cwd=ROOT, check=True)
with tempfile.TemporaryDirectory(prefix='lab4-student-') as folder:
target=Path(folder)
for path in ROOT.glob('*.go'):
shutil.copyfile(path,target/path.name)
for name in ('go.mod','go.sum'):
shutil.copyfile(ROOT/name,target/name)
shutil.copytree(ROOT/'migrations',target/'migrations')
shutil.copyfile(ROOT/'student-tests/validation_test.go',target/'validation_test.go')
subprocess.run(['go','test','-tags','studentvalidation','-count=1','-v','./...'],cwd=target,check=True)
if __name__=='__main__':
main()