forked from TrueCloudLab/frostfs-testcases
Switch failover test to hosting from testlib
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
This commit is contained in:
parent
92c034c10b
commit
48e53b3d86
20 changed files with 242 additions and 441 deletions
|
@ -17,6 +17,7 @@ from common import (
|
|||
)
|
||||
from env_properties import save_env_properties
|
||||
from neofs_testlib.hosting import Hosting
|
||||
from neofs_testlib.reporter import AllureHandler, get_reporter
|
||||
from neofs_testlib.shell import LocalShell, Shell
|
||||
from payment_neogo import neofs_deposit, transfer_mainnet_gas
|
||||
from python_keywords.node_management import node_healthcheck
|
||||
|
@ -25,10 +26,26 @@ logger = logging.getLogger("NeoLogger")
|
|||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def client_shell() -> Shell:
|
||||
def configure_testlib():
|
||||
get_reporter().register_handler(AllureHandler())
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def client_shell(configure_testlib) -> Shell:
|
||||
yield LocalShell()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def hosting(configure_testlib) -> Hosting:
|
||||
with open(HOSTING_CONFIG_FILE, "r") as file:
|
||||
hosting_config = yaml.full_load(file)
|
||||
|
||||
hosting_instance = Hosting()
|
||||
hosting_instance.configure(hosting_config)
|
||||
yield hosting_instance
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def require_multiple_hosts(hosting: Hosting):
|
||||
"""Fixture that is applied to tests that require that environment has multiple hosts."""
|
||||
|
@ -37,16 +54,6 @@ def require_multiple_hosts(hosting: Hosting):
|
|||
yield
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def hosting() -> Hosting:
|
||||
with open(HOSTING_CONFIG_FILE, "r") as file:
|
||||
hosting_config = yaml.full_load(file)
|
||||
|
||||
hosting_instance = Hosting()
|
||||
hosting_instance.configure(hosting_config)
|
||||
yield hosting_instance
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
@allure.title("Check binary versions")
|
||||
def check_binary_versions(request, hosting: Hosting, client_shell: Shell):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue