vmware_category/test: ensure test can run on Zuul

- set the zuul/vmware/vcenter_only alias
- import `prepare_vmware_tests` role
- little refactoring to avoid an extra level of indentation
pull/66372/head
Gonéri Le Bouder 6 years ago
parent 0703590686
commit ce66743b10

@ -1,3 +1,4 @@
shippable/vcenter/group1 shippable/vcenter/group1
cloud/vcenter cloud/vcenter
needs/target/prepare_vmware_tests needs/target/prepare_vmware_tests
zuul/vmware/vcenter_only

@ -2,9 +2,7 @@
# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- when: vcsim is not defined - name: Create different types of category with associable object types
block:
- name: Create different types of category with associable object types
vmware_category: vmware_category:
hostname: '{{ vcenter_hostname }}' hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}' username: '{{ vcenter_username }}'
@ -32,7 +30,7 @@
- vApp - vApp
- Virtual Machine - Virtual Machine
- name: Delete different types of category with associable object types - name: Delete different types of category with associable object types
vmware_category: vmware_category:
hostname: '{{ vcenter_hostname }}' hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}' username: '{{ vcenter_username }}'
@ -57,7 +55,7 @@
- vApp - vApp
- Virtual Machine - Virtual Machine
- name: Create category with 2 associable object types - name: Create category with 2 associable object types
vmware_category: vmware_category:
hostname: '{{ vcenter_hostname }}' hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}' username: '{{ vcenter_username }}'
@ -71,12 +69,12 @@
state: present state: present
register: category_change register: category_change
- name: Assert change is made - name: Assert change is made
assert: assert:
that: that:
- category_change.changed - category_change.changed
- name: Delete category with 2 associable object types - name: Delete category with 2 associable object types
vmware_category: vmware_category:
hostname: '{{ vcenter_hostname }}' hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}' username: '{{ vcenter_username }}'
@ -86,7 +84,7 @@
state: absent state: absent
register: category_change register: category_change
- name: Assert change is made - name: Assert change is made
assert: assert:
that: that:
- category_change.changed - category_change.changed

@ -2,4 +2,8 @@
# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- include: associable_obj_types.yml - when: vcsim is not defined
block:
- import_role:
name: prepare_vmware_tests
- include: associable_obj_types.yml

Loading…
Cancel
Save