Merge pull request #8489 from sean-m-sullivan/workflow_node_logic

Update Logic for workflow node creation/deletion

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-10-29 18:36:40 +00:00
committed by GitHub
2 changed files with 30 additions and 2 deletions

View File

@@ -159,6 +159,30 @@
that:
- "no_name_results.msg == 'Approval node name is required to create approval node.'"
- name: Fail if absent and no identifier set
tower_workflow_job_template_node:
approval_node:
description: "{{ approval_node_name }}"
workflow: "{{ wfjt_name }}"
state: absent
register: no_identifier_results
ignore_errors: true
- assert:
that:
- "no_identifier_results.msg == 'missing required arguments: identifier'"
- name: Fail if present and no unified job template set
tower_workflow_job_template_node:
identifier: approval_test
workflow: "{{ wfjt_name }}"
register: no_unified_results
ignore_errors: true
- assert:
that:
- "no_unified_results.msg == 'state is present but any of the following are missing: unified_job_template, approval_node, success_nodes, always_nodes, failure_nodes'"
- name: Create approval node
tower_workflow_job_template_node:
identifier: approval_test