fix(tests,kubevirt_vm): Assert there are no or expected changes

Assert there are no or expected changes in verify.yml of the kubevirt_vm
integration test. This is necessary since in downstream tests the
kubemacpool operator might add annotations to the VM which can trigger a
changed result.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2024-06-03 16:10:37 +02:00
parent e1b2094e4e
commit 2521e8ba24

View File

@@ -11,10 +11,15 @@
labels:
app: test
register: recreate
- name: Assert module reported no changes
- name: Assert module reported no or expected changes
ansible.builtin.assert:
that:
- not recreate.changed
- >-
not recreate.changed or
recreated.changed and
recreated.method == "update" and
recreated.diff.before.metadata.annotations.get('kubemacpool.io/transaction-timestamp') and
not recreated.diff.after.metadata.annotations
- name: Delete VM
connection: local