Skip to content

Commit

Permalink
refactor: drop custom --test-config option
Browse files Browse the repository at this point in the history
Since Dynaconf is used, there is no need to specify a configuration file
to use for the tests, as Dynaconf takes care about that.

Hence, drop the custom --test-config option for pytest.

Signed-off-by: Pino Toscano <[email protected]>
  • Loading branch information
ptoscano committed Oct 4, 2023
1 parent 10932f6 commit d840f57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions pytest_client_tools/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _create_candlepin_container():

@pytest.fixture(scope="session")
def test_config(request):
return TestConfig(request.config.getoption("--test-config"))
return TestConfig()


@pytest.fixture(scope="session")
Expand Down Expand Up @@ -196,9 +196,6 @@ def rhc(save_rhc_files, test_config):

def pytest_addoption(parser):
group = parser.getgroup("client-tools")
group.addoption(
"--test-config", action="store", type=pathlib.Path, help="custom test config"
)
group.addoption(
"--candlepin-container-is-running",
action="store_true",
Expand Down
2 changes: 1 addition & 1 deletion pytest_client_tools/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestConfig:
def __init__(self, test_config):
def __init__(self):
self._settings = Dynaconf(
envvar_prefix="PYTEST_CLIENT_TOOLS",
settings_files=["settings.toml", ".secrets.toml"],
Expand Down

0 comments on commit d840f57

Please sign in to comment.