29 lines
766 B
Python
29 lines
766 B
Python
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from govoplan_core.core import runtime_coordination
|
|
from govoplan_core.core.runtime_coordination import (
|
|
RuntimeIdentity,
|
|
bind_process_runtime_identity,
|
|
)
|
|
|
|
|
|
@pytest.fixture(scope="session", autouse=True)
|
|
def _bind_test_runtime_identity():
|
|
previous = runtime_coordination._process_runtime_identity
|
|
bind_process_runtime_identity(
|
|
RuntimeIdentity(
|
|
installation_id="campaign-tests",
|
|
node_id="campaign-test-process",
|
|
incarnation="campaign-test-incarnation",
|
|
role="test",
|
|
software_version="test",
|
|
composition_hash="a" * 64,
|
|
)
|
|
)
|
|
try:
|
|
yield
|
|
finally:
|
|
bind_process_runtime_identity(previous)
|