forked from mtusi2026/mtusi2026lab6
lab6
This commit is contained in:
@@ -19,8 +19,8 @@ from client import Client, Failure, arguments, check, run # noqa: E402
|
||||
from tests_helpers import compose, jobctl, psql # noqa: E402
|
||||
|
||||
FIXTURE = Path(__file__).resolve().parents[1] / 'tests/fixtures/sample.png'
|
||||
WORKER = 'mtusi-messenger-lab5-worker-1'
|
||||
RELAY = 'mtusi-messenger-lab5-relay-1'
|
||||
WORKER = 'mtusi-messenger-lab6-worker-1'
|
||||
RELAY = 'mtusi-messenger-lab6-relay-1'
|
||||
|
||||
|
||||
def worker_with(**env):
|
||||
@@ -61,7 +61,7 @@ def wait_db(attachment_id, predicate, timeout=120, description=''):
|
||||
|
||||
|
||||
def queue_messages(name):
|
||||
project = 'mtusi-messenger-lab5'
|
||||
project = 'mtusi-messenger-lab6'
|
||||
result = subprocess.run(
|
||||
['docker', 'exec', project + '-broker-1', 'rabbitmqctl', '-p', 'messenger', 'list_queues', 'name', 'messages'],
|
||||
capture_output=True, text=True, check=True,
|
||||
|
||||
@@ -24,7 +24,7 @@ def jobctl(*args, check=True):
|
||||
|
||||
def psql(sql):
|
||||
"""Read a scalar/list from the stand database (operator evidence only)."""
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab5')
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab6')
|
||||
result = subprocess.run(
|
||||
['docker', 'exec', project + '-postgres-1', 'psql', '-U', 'messenger', '-d', 'messenger', '-Atc', sql],
|
||||
cwd=ROOT, capture_output=True, text=True, check=True,
|
||||
@@ -35,7 +35,7 @@ def psql(sql):
|
||||
|
||||
def containers_by_hostname(service='api'):
|
||||
"""{hostname: {id, name, status}} для контейнеров сервиса."""
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab5')
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab6')
|
||||
listed = subprocess.run(
|
||||
[
|
||||
'docker', 'ps', '-q',
|
||||
|
||||
Reference in New Issue
Block a user