mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-07-25 17:04:35 +00:00
Fix the assertion that was introduced in
2521e8ba24 by removing the superfluous 'd'
at the end of the variable names.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
---
|
|
- name: Verify creation with existing VM
|
|
connection: local
|
|
gather_facts: false
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Create a VM
|
|
kubevirt.core.kubevirt_vm:
|
|
name: testvm
|
|
namespace: default
|
|
labels:
|
|
app: test
|
|
register: recreate
|
|
- name: Assert module reported no or expected changes
|
|
ansible.builtin.assert:
|
|
that:
|
|
- >-
|
|
not recreate.changed or
|
|
recreate.changed and
|
|
recreate.method == "update" and
|
|
recreate.diff.before.metadata.annotations.get('kubemacpool.io/transaction-timestamp') and
|
|
not recreate.diff.after.metadata.annotations
|
|
|
|
- name: Delete VM
|
|
connection: local
|
|
gather_facts: false
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Delete a VM
|
|
kubevirt.core.kubevirt_vm:
|
|
name: testvm
|
|
namespace: default
|
|
state: absent
|
|
wait: true
|
|
|
|
- name: Verify VM deletion
|
|
connection: local
|
|
gather_facts: false
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Delete a VM
|
|
kubevirt.core.kubevirt_vm:
|
|
name: testvm
|
|
namespace: default
|
|
state: absent
|
|
register: delete
|
|
- name: Assert module reported no changes
|
|
ansible.builtin.assert:
|
|
that:
|
|
- not delete.changed
|