Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit linting fix #2

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/pytests/integration/pillar/test_httpclient_in_pillar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

def test_pillar_using_http_query(salt_master, salt_minion, salt_cli, tmp_path):
pillar_top = """
base:
Expand All @@ -10,18 +9,21 @@ def test_pillar_using_http_query(salt_master, salt_minion, salt_cli, tmp_path):
http_query_test: {{ something }}
"""


with salt_master.pillar_tree.base.temp_file("top.sls", pillar_top):
with salt_master.pillar_tree.base.temp_file("http_pillar_test.sls", my_pillar):
with salt_master.pillar_tree.base.temp_file("http_pillar_test.sls", my_pillar):
with salt_master.pillar_tree.base.temp_file(
"http_pillar_test.sls", my_pillar
):
ret = salt_cli.run("state.apply", minion_tgt=salt_minion.id)
assert ret.returncode == 1
assert (
ret.data["no_|-states_|-states_|-None"]["comment"]
== "No states found for this minion"
)

pillar_ret = salt_cli.run("pillar.item", "http_query_test", minion_tgt=salt_minion.id)
pillar_ret = salt_cli.run(
"pillar.item", "http_query_test", minion_tgt=salt_minion.id
)
assert pillar_ret.returncode == 0

assert '"http_query_test": 200' in pillar_ret.stdout