gpg_keypair module integration tests

pull/743/head
Austin Lucas Lake 2024-04-30 20:59:27 -07:00
parent f03b55e1fa
commit 3ec2fa1f56
No known key found for this signature in database
GPG Key ID: 6A37FA54CFCFA4DB
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
azp/posix/1
destructive

View File

@ -0,0 +1,7 @@
---
# Copyright (c) 2024, Austin Lucas Lake <53884490+austinlucaslake@users.noreply.github.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_gnupg

View File

@ -0,0 +1,30 @@
####################################################################
# WARNING: These are designed specifically for Ansible tests #
# and should not be used as examples of how to write Ansible roles #
####################################################################
# Test code for the github_issue module.
#
# Copyright (c) 2024, Austin Lucas Lake <53884490+austinlucaslake@users.noreply.github.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Create GPG key
github_gpg_key:
name: {{ name }}
comment: {{ comment }}
email: {{ email }}
register: created_gpg_key
- name: Delete GPG key
github_gpg_key:
state: absent
name: {{ name }}
comment: {{ comment }}
email: {{ email }}
register: deleted_gpg_key
- assert:
that:
- created_gpg_key.changed
- delete_gpg_key.changed

View File

@ -0,0 +1,8 @@
---
# Copyright (c) 2024, Austin Lucas Lake <53884490+austinlucaslake@users.noreply.github.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
name: name
comment: comment
email: name@email.com