mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00

* test(integration): set the base for integration tests * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test * ci: add ci pipeline for integration test
27 lines
660 B
Python
27 lines
660 B
Python
import pytest
|
|
|
|
from fixtures import types
|
|
|
|
|
|
@pytest.fixture(name="sqlstore", scope="package")
|
|
def sqlstore(
|
|
request: pytest.FixtureRequest,
|
|
) -> types.TestContainerSQL:
|
|
"""
|
|
Packaged-scoped fixture for creating sql store.
|
|
"""
|
|
provider = request.config.getoption("--sqlstore-provider")
|
|
|
|
if provider == "postgres":
|
|
store = request.getfixturevalue("postgres")
|
|
return store
|
|
if provider == "sqlite":
|
|
store = request.getfixturevalue("sqlite")
|
|
return store
|
|
|
|
raise pytest.FixtureLookupError(
|
|
argname=f"{provider}",
|
|
request=request,
|
|
msg=f"{provider} does not have a fixture",
|
|
)
|