forked from mtusi2026/mtusi2026lab7
lab7: безопасность, mTLS, OpenBao и PKI lifecycle
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"""Upload through one API replica, stop it, download through another.
|
||||
|
||||
Run against a live stand:
|
||||
python3 student-tests/attachment_failover.py --base-url http://localhost:8080
|
||||
python3 student-tests/attachment_failover.py --base-url https://localhost:8443
|
||||
"""
|
||||
import hashlib
|
||||
import os
|
||||
@@ -14,16 +14,18 @@ from urllib.parse import quote
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
|
||||
|
||||
from client import Client, Failure, arguments, check, run # noqa: E402
|
||||
from tests_helpers import ROOT, compose # noqa: E402
|
||||
from lab7_http import BASE_URL, CA_FILE # noqa: E402
|
||||
|
||||
FIXTURE = Path(__file__).resolve().parents[1] / 'tests/fixtures/sample.png'
|
||||
|
||||
|
||||
def main():
|
||||
args = arguments('Attachment failover across API replicas (lab4)')
|
||||
client = Client(args.base_url, args.ca_file)
|
||||
client = Client(args.base_url or BASE_URL, args.ca_file or CA_FILE)
|
||||
alice, bob, _, chat = client.bootstrap()
|
||||
content = FIXTURE.read_bytes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user