mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 15:36:48 +00:00
19 lines
356 B
Python
19 lines
356 B
Python
|
|
import pytest
|
||
|
|
from testcontainers.core.container import Network
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.fixture(name="network", scope="package")
|
||
|
|
def network(request: pytest.FixtureRequest) -> Network:
|
||
|
|
"""
|
||
|
|
Package-Scoped fixture for creating a network
|
||
|
|
"""
|
||
|
|
nw = Network()
|
||
|
|
nw.create()
|
||
|
|
|
||
|
|
def stop():
|
||
|
|
nw.remove()
|
||
|
|
|
||
|
|
request.addfinalizer(stop)
|
||
|
|
|
||
|
|
return nw
|