mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update versionadded
This commit is contained in:
parent
dffe37973d
commit
4b08e2976a
3 changed files with 28 additions and 31 deletions
|
@ -249,7 +249,7 @@ def search_keys(text, keyserver=None, user=None, gnupghome=None):
|
|||
gnupghome
|
||||
Specify the location where the GPG keyring and related files are stored.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -303,7 +303,7 @@ def list_keys(user=None, gnupghome=None, keyring=None):
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -360,7 +360,7 @@ def list_secret_keys(user=None, gnupghome=None, keyring=None):
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -477,7 +477,7 @@ def create_key(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -581,7 +581,7 @@ def delete_key(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -692,7 +692,7 @@ def get_key(keyid=None, fingerprint=None, user=None, gnupghome=None, keyring=Non
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -766,7 +766,7 @@ def get_secret_key(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -841,7 +841,7 @@ def import_key(text=None, filename=None, user=None, gnupghome=None, keyring=None
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -930,7 +930,7 @@ def export_key(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ def receive_keys(keyserver=None, keys=None, user=None, gnupghome=None, keyring=N
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1083,13 +1083,13 @@ def trust_key(
|
|||
gnupghome
|
||||
Specify the location where the GPG keyring and related files are stored.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
keyring
|
||||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1220,7 +1220,7 @@ def sign(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1321,7 +1321,7 @@ def verify(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1516,7 +1516,7 @@ def encrypt(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -1624,7 +1624,7 @@ def decrypt(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ def present(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
"""
|
||||
|
||||
ret = {"name": name, "result": True, "changes": {}, "comment": []}
|
||||
|
@ -83,7 +83,7 @@ def present(
|
|||
keys = [keys]
|
||||
|
||||
for key in keys:
|
||||
if key in current_keys.keys():
|
||||
if key in current_keys:
|
||||
if trust:
|
||||
if trust in TRUST_MAP:
|
||||
if current_keys[key]["trust"] != TRUST_MAP[trust]:
|
||||
|
@ -203,13 +203,13 @@ def absent(
|
|||
Limit the operation to this specific keyring, specified as
|
||||
a local filesystem path.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
|
||||
keyring_absent_if_empty
|
||||
Make sure to not leave behind an empty keyring file
|
||||
if ``keyring`` was specified. Defaults to false.
|
||||
|
||||
.. versionadded:: 3006
|
||||
.. versionadded:: 3007.0
|
||||
"""
|
||||
|
||||
ret = {"name": name, "result": True, "changes": {}, "comment": []}
|
||||
|
|
|
@ -25,7 +25,7 @@ def gpghome(tmp_path):
|
|||
try:
|
||||
yield root
|
||||
finally:
|
||||
# Make sure we don't leave any gpg-agent's running behind
|
||||
# Make sure we don't leave any gpg-agents running behind
|
||||
gpg_connect_agent = shutil.which("gpg-connect-agent")
|
||||
if gpg_connect_agent:
|
||||
gnupghome = root / ".gnupg"
|
||||
|
@ -58,10 +58,7 @@ def gpghome(tmp_path):
|
|||
|
||||
@pytest.fixture
|
||||
def gpg(loaders, modules, gpghome):
|
||||
try:
|
||||
yield modules.gpg
|
||||
finally:
|
||||
pass
|
||||
yield modules.gpg
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -469,7 +466,7 @@ def test_list_secret_keys_in_keyring(gpghome, gpg, keyring_privkeys, gnupg_privk
|
|||
|
||||
|
||||
@pytest.mark.skip_unless_on_linux(reason="Test setup with private keys fails")
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_create_key(gpghome, gpg, gnupg):
|
||||
res = gpg.create_key(gnupghome=str(gpghome))
|
||||
assert res
|
||||
|
@ -481,7 +478,7 @@ def test_create_key(gpghome, gpg, gnupg):
|
|||
|
||||
|
||||
@pytest.mark.skip_unless_on_linux(reason="Test setup with private keys fails")
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_create_key_in_keyring(gpghome, gpg, gnupg, keyring, gnupg_keyring):
|
||||
res = gpg.create_key(gnupghome=str(gpghome), keyring=keyring)
|
||||
assert res
|
||||
|
@ -651,7 +648,7 @@ def test_trust_key_keyring(
|
|||
|
||||
@pytest.mark.usefixtures("privkeys_present")
|
||||
@pytest.mark.skip_unless_on_linux(reason="Test setup with private keys fails")
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_sign(gpghome, gpg, gnupg, key_a_fp):
|
||||
assert gnupg.list_keys(secret=True, keys=key_a_fp)
|
||||
res = gpg.sign(text="foo", keyid=key_a_fp, gnupghome=str(gpghome))
|
||||
|
@ -661,7 +658,7 @@ def test_sign(gpghome, gpg, gnupg, key_a_fp):
|
|||
|
||||
|
||||
@pytest.mark.skip_unless_on_linux(reason="Test setup with private keys fails")
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_sign_with_keyring(
|
||||
gpghome, gpg, gnupg, key_a_fp, gnupg_privkeyring, keyring_privkeys
|
||||
):
|
||||
|
@ -812,7 +809,7 @@ def test_verify_with_keyring(gpghome, gnupg, gpg, keyring, sig, signed_data, key
|
|||
|
||||
|
||||
@pytest.mark.usefixtures("pubkeys_present")
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_encrypt(gpghome, gpg, gnupg, key_b_fp):
|
||||
assert gnupg.list_keys(keys=key_b_fp)
|
||||
res = gpg.encrypt(
|
||||
|
@ -828,7 +825,7 @@ def test_encrypt(gpghome, gpg, gnupg, key_b_fp):
|
|||
assert res["comment"].endswith(b"-----END PGP MESSAGE-----\n")
|
||||
|
||||
|
||||
@pytest.mark.requires_random_entropy()
|
||||
@pytest.mark.requires_random_entropy
|
||||
def test_encrypt_with_keyring(gpghome, gpg, gnupg, key_a_fp, keyring, gnupg_keyring):
|
||||
assert not gnupg.list_keys(keys=key_a_fp)
|
||||
assert gnupg_keyring.list_keys(keys=key_a_fp)
|
||||
|
|
Loading…
Add table
Reference in a new issue