Skip to content

Commit 30eeb7e

Browse files
committed
Output files contents on error
1 parent 374aa21 commit 30eeb7e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/pytests/integration/pillar/test_httpclient_in_pillar.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
def test_pillar_using_http_query(salt_master, salt_minion, salt_cli, tmp_path):
1+
def test_pillar_using_http_query(salt_master, salt_minion, salt_cli):
22
pillar_top = """
33
base:
44
"*":
@@ -9,8 +9,15 @@ def test_pillar_using_http_query(salt_master, salt_minion, salt_cli, tmp_path):
99
http_query_test: {{ something }}
1010
"""
1111

12-
with salt_master.pillar_tree.base.temp_file("top.sls", pillar_top):
13-
with salt_master.pillar_tree.base.temp_file("http_pillar_test.sls", my_pillar):
12+
with salt_master.pillar_tree.base.temp_file(
13+
"top.sls",
14+
pillar_top,
15+
) as p_top:
16+
with salt_master.pillar_tree.base.temp_file(
17+
"http_pillar_test.sls", my_pillar
18+
) as p_data:
19+
top_content = p_top.read_text()
20+
pillar_content = p_data.read_text()
1421
ret = salt_cli.run("state.apply", minion_tgt=salt_minion.id)
1522
assert ret.returncode == 1
1623
assert (

0 commit comments

Comments
 (0)