Skip to content

Commit 4540fcb

Browse files
committed
fix: remove --connection argument to avoid conflict with testinfra
As testinfra is already using `--connection` argument, we will only recognize `--ansible-connection` variant from now on, so we do not endup with conflicts.
1 parent 366dbac commit 4540fcb

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/pytest_ansible/plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def pytest_addoption(parser: pytest.Parser) -> None:
144144
help="further limit selected hosts to an additional pattern",
145145
)
146146
group.addoption(
147-
"--connection",
148147
"--ansible-connection",
149148
action="store",
150149
dest="ansible_connection",

tests/test_params.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_plugin_help(pytester): # type: ignore[no-untyped-def] # noqa: ANN001,
4545
# Check for the specific args
4646
" --inventory*, --ansible-inventory=ANSIBLE_INVENTORY",
4747
" --host-pattern*, --ansible-host-pattern=ANSIBLE_HOST_PATTERN",
48-
" --connection*, --ansible-connection=ANSIBLE_CONNECTION",
48+
" --ansible-connection=ANSIBLE_CONNECTION",
4949
" --user*, --ansible-user=ANSIBLE_USER",
5050
" --check, --ansible-check",
5151
" --module-path*, --ansible-module-path=ANSIBLE_MODULE_PATH",
@@ -129,7 +129,6 @@ def test_func({fixture_name}):
129129
"--ansible-inventory",
130130
"--inventory",
131131
"--ansible-connection",
132-
"--connection",
133132
"--ansible-user",
134133
"--user",
135134
"--ansible-become-method",

0 commit comments

Comments
 (0)