mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 04:52:55 +00:00
Start and stop single etcd and mock s3 servers globally in python tests
This commit is contained in:
committed by
Kirill Bulatov
parent
a884f4cf6b
commit
f2881bbd8a
@@ -3,8 +3,10 @@ import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import threading
|
||||
import typing
|
||||
from uuid import UUID
|
||||
from fixtures.log_helper import log
|
||||
from typing import Optional
|
||||
import signal
|
||||
import pytest
|
||||
|
||||
@@ -22,7 +24,7 @@ def new_pageserver_helper(new_pageserver_dir: pathlib.Path,
|
||||
remote_storage_mock_path: pathlib.Path,
|
||||
pg_port: int,
|
||||
http_port: int,
|
||||
broker: Etcd):
|
||||
broker: Optional[Etcd]):
|
||||
"""
|
||||
cannot use ZenithPageserver yet because it depends on zenith cli
|
||||
which currently lacks support for multiple pageservers
|
||||
@@ -37,9 +39,11 @@ def new_pageserver_helper(new_pageserver_dir: pathlib.Path,
|
||||
f"-c pg_distrib_dir='{pg_distrib_dir}'",
|
||||
f"-c id=2",
|
||||
f"-c remote_storage={{local_path='{remote_storage_mock_path}'}}",
|
||||
f"-c broker_endpoints=['{broker.client_url()}']",
|
||||
]
|
||||
|
||||
if broker is not None:
|
||||
cmd.append(f"-c broker_endpoints=['{broker.client_url()}']", )
|
||||
|
||||
subprocess.check_output(cmd, text=True)
|
||||
|
||||
# actually run new pageserver
|
||||
|
||||
Reference in New Issue
Block a user