Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
emfollow
gwcelery
Commits
61733b4f
Commit
61733b4f
authored
Aug 27, 2021
by
Cody Messick
Committed by
Leo P. Singer
Sep 09, 2021
Browse files
Add tmp_path fixture to test_nagios
parent
a220e5e1
Changes
1
Show whitespace changes
Inline
Side-by-side
gwcelery/tests/test_tools_nagios.py
View file @
61733b4f
...
...
@@ -21,11 +21,11 @@ def test_nagios_unknown_error(monkeypatch, capsys):
assert
'UNKNOWN: Unexpected error'
in
out
def
test_nagios
(
capsys
,
monkeypatch
,
socket_enabled
,
starter
):
def
test_nagios
(
capsys
,
monkeypatch
,
socket_enabled
,
starter
,
tmp_path
):
mock_lvalert_client
=
Mock
()
monkeypatch
.
setattr
(
'gwcelery.lvalert.client.LVAlertClient'
,
mock_lvalert_client
)
unix_socket
=
app
.
conf
[
'broker_url'
].
replace
(
'redis+socket://'
,
'
'
)
unix_socket
=
app
.
conf
[
'broker_url'
].
replace
(
'redis+socket://'
,
f
'redis+socket://
{
tmp_path
.
as_posix
()
}
'
)
# no broker
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment