mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
only print secrets, adapt tests
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
08e03f0525
commit
5aea5f4a46
2 changed files with 10 additions and 12 deletions
|
|
@ -60,15 +60,13 @@ result:
|
|||
type: dict
|
||||
returned: always
|
||||
sample: {
|
||||
"result": {
|
||||
"secrets": [
|
||||
{
|
||||
"created_at": "2026-01-11T23:19:00Z",
|
||||
"name": "ANSIBLE",
|
||||
"updated_at": "2026-02-15T22:18:16Z"
|
||||
},
|
||||
]
|
||||
},
|
||||
"secrets": [
|
||||
{
|
||||
"created_at": "2026-01-11T23:19:00Z",
|
||||
"name": "ANSIBLE",
|
||||
"updated_at": "2026-02-15T22:18:16Z"
|
||||
},
|
||||
]
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
@ -147,7 +145,7 @@ def main() -> None:
|
|||
|
||||
result["changed"] = False
|
||||
result.update(
|
||||
result=secrets,
|
||||
secrets=secrets["secrets"],
|
||||
)
|
||||
|
||||
module.exit_json(**result)
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ def test_list_repo_secrets(fetch_url_mock):
|
|||
|
||||
result = exc.value.args[0]
|
||||
assert result["changed"] is False
|
||||
assert result["result"]["secrets"] == GITHUB_SECRETS_RESPONSE["secrets"]
|
||||
assert result["secrets"] == GITHUB_SECRETS_RESPONSE["secrets"]
|
||||
|
||||
|
||||
def test_fail_list_repo_secrets(fetch_url_mock):
|
||||
|
|
@ -95,4 +95,4 @@ def test_fail_list_repo_secrets(fetch_url_mock):
|
|||
|
||||
result = exc.value.args[0]
|
||||
assert result["changed"] is False
|
||||
assert result["result"]["secrets"] == []
|
||||
assert result["secrets"] == []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue