Fix line endings in auth_v1 test key

This commit is contained in:
Daniel A. Wozniak 2024-02-13 22:39:00 -07:00 committed by Daniel Wozniak
parent 37587fbd8a
commit 5150b7f726
2 changed files with 13 additions and 1 deletions

View 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()

View file

@ -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",