mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Add test for listing revoked key
This commit is contained in:
parent
8ca87be64a
commit
a1a07d1c8c
1 changed files with 34 additions and 2 deletions
|
@ -243,7 +243,29 @@ def test_list_keys():
|
|||
"trust": "-",
|
||||
"type": "pub",
|
||||
"uids": ["GPG Person <person@example.com>"],
|
||||
}
|
||||
},
|
||||
{
|
||||
"dummy": "",
|
||||
"keyid": "yyyyyyyyyyyyyyyy",
|
||||
"expires": "2011188692",
|
||||
"sigs": [],
|
||||
"subkeys": [
|
||||
[
|
||||
"yyyyyyyyyyyyyyyy",
|
||||
"e",
|
||||
"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
|
||||
]
|
||||
],
|
||||
"length": "4096",
|
||||
"ownertrust": "-",
|
||||
"sig": "",
|
||||
"algo": "1",
|
||||
"fingerprint": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
|
||||
"date": "1506612692",
|
||||
"trust": "r",
|
||||
"type": "pub",
|
||||
"uids": ["GPG Person <person@example.com>"],
|
||||
},
|
||||
]
|
||||
|
||||
_expected_result = [
|
||||
|
@ -256,7 +278,17 @@ def test_list_keys():
|
|||
"ownerTrust": "Unknown",
|
||||
"fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"trust": "Unknown",
|
||||
}
|
||||
},
|
||||
{
|
||||
"keyid": "yyyyyyyyyyyyyyyy",
|
||||
"uids": ["GPG Person <person@example.com>"],
|
||||
"created": "2017-09-28",
|
||||
"expires": "2033-09-24",
|
||||
"keyLength": "4096",
|
||||
"ownerTrust": "Unknown",
|
||||
"fingerprint": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
|
||||
"trust": "Revoked",
|
||||
},
|
||||
]
|
||||
|
||||
mock_opt = MagicMock(return_value="root")
|
||||
|
|
Loading…
Add table
Reference in a new issue