Files
scylladb/test/redis/conftest.py
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00

28 lines
974 B
Python

# Copyright 2020-present ScyllaDB
#
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
# This file contains "test fixtures", a pytest concept described in
# https://docs.pytest.org/en/latest/fixture.html.
# A "fixture" is some sort of setup which an individual test requires to run.
# The fixture has setup code and teardown code, and if multiple tests
# require the same fixture, it can be set up only once - while still allowing
# the user to run individual tests and automatically set up the fixtures they need.
import pytest
def pytest_addoption(parser):
parser.addoption("--redis-host", action="store", default="localhost",
help="ip address")
parser.addoption("--redis-port", action="store", type=int, default=6379,
help="port number")
@pytest.fixture
def redis_host(request):
return request.config.getoption('--redis-host')
@pytest.fixture
def redis_port(request):
return request.config.getoption('--redis-port')