mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix line endings in auth_v1 test key
This commit is contained in:
parent
37587fbd8a
commit
5150b7f726
2 changed files with 13 additions and 1 deletions
12
tests/pytests/functional/test_crypt.py
Normal file
12
tests/pytests/functional/test_crypt.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
import pathlib
|
||||
|
||||
import pytest
|
||||
|
||||
import salt.crypt
|
||||
|
||||
|
||||
@pytest.mark.windows_whitelisted
|
||||
def test_generated_keys(tmp_path):
|
||||
priv = salt.crypt.gen_keys(tmp_path, "aaa", 2048)
|
||||
assert "\r" not in pathlib.Path(priv).read_text()
|
||||
assert "\r" not in pathlib.Path(priv.replace(".pem", ".pub")).read_text()
|
|
@ -1044,7 +1044,7 @@ async def test_req_serv_auth_v1(pki_dir):
|
|||
with salt.utils.files.fopen(
|
||||
str(pki_dir.joinpath("minion", "minion.pub")), "r"
|
||||
) as fp:
|
||||
pub_key = fp.read()
|
||||
pub_key = salt.crypt.clean_key(fp.read())
|
||||
|
||||
load = {
|
||||
"cmd": "_auth",
|
||||
|
|
Loading…
Add table
Reference in a new issue