mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Merge pull request #7873 from sean-m-sullivan/project_update
Project update Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
---
|
||||
- name: Generate a random string for test
|
||||
set_fact:
|
||||
test_id: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
when: test_id is not defined
|
||||
|
||||
- name: Generate names
|
||||
set_fact:
|
||||
project_name1: "AWX-Collection-tests-tower_project_update-project-{{ test_id }}"
|
||||
|
||||
- name: Create a git project without credentials without waiting
|
||||
tower_project:
|
||||
name: "{{ project_name1 }}"
|
||||
organization: Default
|
||||
scm_type: git
|
||||
scm_url: https://github.com/ansible/test-playbooks
|
||||
wait: false
|
||||
register: project_create_result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- project_create_result is changed
|
||||
|
||||
- name: Update a project without waiting
|
||||
tower_project_update:
|
||||
name: "{{ project_name1 }}"
|
||||
organization: Default
|
||||
wait: false
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Update a project and wait
|
||||
tower_project_update:
|
||||
name: "{{ project_name1 }}"
|
||||
organization: Default
|
||||
wait: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is successful
|
||||
|
||||
- name: Update a project by ID
|
||||
tower_project_update:
|
||||
name: "{{ project_create_result.id }}"
|
||||
organization: Default
|
||||
wait: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is successful
|
||||
|
||||
- name: Delete the test project 1
|
||||
tower_project:
|
||||
name: "{{ project_name1 }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
Reference in New Issue
Block a user