mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
add test to check netapi_client setting error is listed in 400 error when netwpi_client setting is not set
This commit is contained in:
parent
9f1d251e0a
commit
f06a02eb08
1 changed files with 17 additions and 0 deletions
|
@ -17,6 +17,23 @@ async def test_run_good_login(http_client, auth_creds):
|
|||
assert response.code == 200
|
||||
|
||||
|
||||
async def test_run_netapi_client_not_set(http_client, auth_creds):
|
||||
"""
|
||||
Test the run URL with good auth credentials
|
||||
"""
|
||||
low = {"client": "local", "tgt": "*", "fun": "test.ping", **auth_creds}
|
||||
body = urllib.parse.urlencode(low)
|
||||
|
||||
response = await http_client.fetch(
|
||||
"/run", method="POST", body=body, raise_error=False
|
||||
)
|
||||
assert response.code == 400
|
||||
assert (
|
||||
"Client disabled: 'local'. Add to 'netapi_enable_clients' master config option to enable"
|
||||
in response.body
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.netapi_client_data(["local"])
|
||||
async def test_run_bad_login(http_client):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue