Skip to content

Commit

Permalink
Attempt to use subfolders within temporary directory for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed Apr 30, 2022
1 parent ab940ae commit 02f65fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pytest_rabbitmq/factories/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
envvars = {
"RABBITMQ_LOG_BASE": logpath + f"/rabbit-server.{port}.log",
"RABBITMQ_MNESIA_BASE": path + "mnesia",
"RABBITMQ_ENABLED_PLUGINS_FILE": plugin_path + "/plugins",
"RABBITMQ_ENABLED_PLUGINS_FILE": plugin_path + "/enabled",
"RABBITMQ_PLUGINS_DIR": plugin_path,
"RABBITMQ_NODE_PORT": str(port),
# Use the port number in node name, so multiple instances started
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_rabbitmq/factories/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def rabbitmq_proc_fixture(request):
rabbit_port = get_port(port) or get_port(config["port"])

rabbit_path = os.path.join(gettempdir(), f"rabbitmq.{rabbit_port}/")
rabbit_plugin_path = plugindir or config["plugindir"] or rabbit_path
rabbit_plugin_path = plugindir or config["plugindir"] or os.path.join(rabbit_path, "plugins")

rabbit_executor = RabbitMqExecutor(
rabbit_server,
Expand Down
4 changes: 2 additions & 2 deletions src/pytest_rabbitmq/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def pytest_addoption(parser):
)
parser.addini(
name="rabbitmq_plugindir",
help=_help_logsdir,
default=gettempdir(),
help=_help_plugindir,
default=None,
)
parser.addini(
name="rabbitmq_node",
Expand Down

0 comments on commit 02f65fb

Please sign in to comment.