mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-09 04:00:31 -07:00
github_gpg_key module integration tests
This commit is contained in:
parent
b071e3a254
commit
556bee6b70
3 changed files with 42 additions and 0 deletions
6
tests/integration/targets/github_gpg_key/aliases
Normal file
6
tests/integration/targets/github_gpg_key/aliases
Normal 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
|
28
tests/integration/targets/github_gpg_key/tasks/main.yml
Normal file
28
tests/integration/targets/github_gpg_key/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
####################################################################
|
||||
# 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 <akasurde@redhat.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:
|
||||
token: {{ token }}
|
||||
name: {{ name }}
|
||||
armored_gpg_key: {{ armored_gpg_key }}
|
||||
register: created_gpg_key
|
||||
|
||||
- name: Delete GPG key
|
||||
github_gpg_key:
|
||||
state: absent
|
||||
token: {{ token }}
|
||||
name: {{ name }}
|
||||
register: deleted_gpg_key
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- created_gpg_key.id == deleted_gpg_key[0].id
|
8
tests/integration/targets/github_gpg_key/vars/main.yml
Normal file
8
tests/integration/targets/github_gpg_key/vars/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# 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
|
||||
|
||||
token: # TODO
|
||||
name: # TODO
|
||||
armored_public_key: # TODO
|
Loading…
Add table
Reference in a new issue