summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-test-sanity-action-plugin-docs
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2024-06-12 22:16:15 +0200
committerGitHub <noreply@github.com>2024-06-12 22:16:15 +0200
commita9b902f5797d9ad8b449394416f1082c241887ce (patch)
treee0fd7cf3cae9f810e56e5b7213d26c947145e159 /test/integration/targets/ansible-test-sanity-action-plugin-docs
parentRevert warning message in setup/gather_facts (#83427) (diff)
downloadansible-a9b902f5797d9ad8b449394416f1082c241887ce.tar.xz
ansible-a9b902f5797d9ad8b449394416f1082c241887ce.zip
ansible-test action-plugin-docs sidecar (#83325)
Fix to have ansible-test sanity --test action-plugin-docs to check for action plugin documentation inside a sidecar file rather than a Python module.
Diffstat (limited to 'test/integration/targets/ansible-test-sanity-action-plugin-docs')
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/aliases4
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/other.yml1
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_py.py11
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yaml.py11
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yml.py11
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_py.py19
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yaml.yaml16
-rw-r--r--test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yml.yml16
-rwxr-xr-xtest/integration/targets/ansible-test-sanity-action-plugin-docs/runme.sh9
9 files changed, 98 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/aliases b/test/integration/targets/ansible-test-sanity-action-plugin-docs/aliases
new file mode 100644
index 0000000000..7741d44451
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/aliases
@@ -0,0 +1,4 @@
+shippable/posix/group3 # runs in the distro test containers
+shippable/generic/group1 # runs in the default test container
+context/controller
+needs/target/collection
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/other.yml b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/other.yml
new file mode 100644
index 0000000000..436e7be8a9
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/other.yml
@@ -0,0 +1 @@
+random: data \ No newline at end of file
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_py.py b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_py.py
new file mode 100644
index 0000000000..a1934b3419
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_py.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import annotations
+
+from ansible.plugins.action import ActionBase
+
+
+class ActionModule(ActionBase):
+ def run(self, tmp, task_vars):
+ return {"changed": False}
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yaml.py b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yaml.py
new file mode 100644
index 0000000000..a1934b3419
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yaml.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import annotations
+
+from ansible.plugins.action import ActionBase
+
+
+class ActionModule(ActionBase):
+ def run(self, tmp, task_vars):
+ return {"changed": False}
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yml.py b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yml.py
new file mode 100644
index 0000000000..a1934b3419
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/action/with_yml.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import annotations
+
+from ansible.plugins.action import ActionBase
+
+
+class ActionModule(ActionBase):
+ def run(self, tmp, task_vars):
+ return {"changed": False}
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_py.py b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_py.py
new file mode 100644
index 0000000000..51c540e9f0
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_py.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+DOCUMENTATION = r"""
+---
+module: with_py
+short_description: Short description
+description: Long description
+options: {}
+author:
+ - Ansible Core Team (@ansible)
+"""
+
+EXAMPLES = r"""
+- name: Some example
+ ns.col.with_py:
+"""
+
+RETURNS = ""
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yaml.yaml b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yaml.yaml
new file mode 100644
index 0000000000..394c36230e
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yaml.yaml
@@ -0,0 +1,16 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+DOCUMENTATION:
+ module: with_yaml
+ short_description: Short description
+ description: Long description
+ options: {}
+ author:
+ - Ansible Core Team (@ansible)
+
+EXAMPLES: |
+ - name: Some example
+ ns.col.with_yaml:
+
+RETURNS: {}
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yml.yml b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yml.yml
new file mode 100644
index 0000000000..18f84589f5
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/ansible_collections/ns/col/plugins/modules/with_yml.yml
@@ -0,0 +1,16 @@
+# Copyright (c) 2024 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+DOCUMENTATION:
+ module: with_yml
+ short_description: Short description
+ description: Long description
+ options: {}
+ author:
+ - Ansible Core Team (@ansible)
+
+EXAMPLES: |
+ - name: Some example
+ ns.col.with_yml:
+
+RETURNS: {}
diff --git a/test/integration/targets/ansible-test-sanity-action-plugin-docs/runme.sh b/test/integration/targets/ansible-test-sanity-action-plugin-docs/runme.sh
new file mode 100755
index 0000000000..85f7f6a084
--- /dev/null
+++ b/test/integration/targets/ansible-test-sanity-action-plugin-docs/runme.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -eu
+
+source ../collection/setup.sh
+
+set -x
+
+ansible-test sanity --test action-plugin-docs --color "${@}"