Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/integration/targets/remote_cluster_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
register: initial

- name: If remote cluster is configured
when: sc_config[sc_host].sc_replication_dest_host
# sc_replication_dest_host is a non-empty URL string when configured, "" when not --
# a bare string in `when:` used to be truthy-tested implicitly, but ansible-core
# 2.17.4 rejects it with "Conditionals must have a boolean result" the first time the
# string is genuinely non-empty (MEASURED 2026-10-29).
when: sc_config[sc_host].sc_replication_dest_host | length > 0
block:
- ansible.builtin.assert:
that:
Expand All @@ -33,7 +37,7 @@
- results.records[0].name == initial.records[0].name

- name: If remote cluster is not configured
when: not sc_config[sc_host].sc_replication_dest_host
when: sc_config[sc_host].sc_replication_dest_host | length == 0
block:
- ansible.builtin.assert:
that:
Expand Down
8 changes: 6 additions & 2 deletions tests/integration/targets/version_update_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@
- updates.records[-1].uuid == sc_config[sc_host].features.version_update.latest_version
- updates.next.uuid == sc_config[sc_host].features.version_update.next_version
- updates.latest.uuid == sc_config[sc_host].features.version_update.latest_version
when: sc_config[sc_host].features.version_update.next_version
# next_version is a non-empty version string when the host has real updates offered,
# "" when not -- a bare string in `when:` used to be truthy-tested implicitly, but
# ansible-core 2.17.4 rejects it the first time the string is genuinely non-empty
# (MEASURED 2026-10-29).
when: sc_config[sc_host].features.version_update.next_version | length > 0

- name: Check returned update list - no updates available
ansible.builtin.assert:
that:
- updates.records == []
when: not sc_config[sc_host].features.version_update.next_version
when: sc_config[sc_host].features.version_update.next_version | length == 0
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@

block:
- name: Check replication is configured
# sc_replication_dest_host is a non-empty URL string when configured, "" when not --
# a bare string here used to be truthy-tested implicitly, but ansible-core 2.17.4
# rejects it the first time the string is genuinely non-empty (MEASURED 2026-10-29).
ansible.builtin.assert:
that:
- sc_config[sc_host].sc_replication_dest_host
- sc_config[sc_host].sc_replication_dest_host | length > 0

- include_tasks: 01_cleanup.yml
- include_tasks: 02_prepare_source_vms.yml
Expand Down
11 changes: 8 additions & 3 deletions tests/integration/targets/vm_replication_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
- include_tasks: 01_vm_replication_info_missing_vm.yml

- include_tasks: 02_cleanup_destination_vms.yml
when: sc_config[sc_host].sc_replication_dest_host
# sc_replication_dest_host is a non-empty URL string when configured, "" when not --
# a bare string in `when:` used to be truthy-tested implicitly, but ansible-core
# 2.17.4 rejects it with "Conditionals must have a boolean result" the first time the
# string is genuinely non-empty (MEASURED 2026-10-29, hypercore-ci-fleet's Indy-lab
# fixture is the first host in a long time to set a real non-empty value here).
when: sc_config[sc_host].sc_replication_dest_host | length > 0

# We can create VM and check vm_replication_info output also on
# cluster without replication
- include_tasks: 03_recreate_source_vms.yml

- include_tasks: 10_vm_replication_info.yml
when: sc_config[sc_host].sc_replication_dest_host
when: sc_config[sc_host].sc_replication_dest_host | length > 0

- include_tasks: 20_vm_info.yml
when: sc_config[sc_host].sc_replication_dest_host
when: sc_config[sc_host].sc_replication_dest_host | length > 0

- include_tasks: 99_cleanup.yml
Loading