Skip to content

Commit

Permalink
in progress changes
Browse files Browse the repository at this point in the history
  • Loading branch information
trgill committed Jun 11, 2024
1 parent 0cc674f commit d5391b8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
3 changes: 1 addition & 2 deletions tests/tests_check_no_lv_fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
__snapshot_failed_msg: >-
Role check did not fail with incorrect LV name
__snapshot_failed_params:
snapshot_lvm_action: check
snapshot_lvm_vg: test_vg1
snapshot_lvm_lv: xxxxx
snapshot_lvm_snapset_name: snapset1
snapshot_lvm_verify_only: true
snapshot_lvm_action: check
__snapshot_failed_changed: false
always:
- name: Cleanup
Expand Down
6 changes: 5 additions & 1 deletion tests/tests_check_no_vg_fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@
__snapshot_failed_regex: "source volume group does not exist:*"
__snapshot_failed_msg: Role check did not fail with wrong VG
__snapshot_failed_params:
snapshot_lvm_action: check
snapshot_lvm_vg: xxxxxx
snapshot_lvm_snapset_name: snapset1
snapshot_lvm_verify_only: true
snapshot_lvm_action: check
snapshot_lvm_all_vgs: false
snapshot_lvm_mountpoint_create: false
snapshot_lvm_unmount_all: false
snapshot_lvm_mount_origin: false
__snapshot_failed_changed: false
always:
- name: Cleanup
Expand Down
3 changes: 3 additions & 0 deletions tests/tests_mount_no_vg_fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
snapshot_lvm_lv: lv1
snapshot_lvm_mountpoint: "{{ test_mnt_parent ~ '/lv1_mp' }}"
snapshot_lvm_mountpoint_create: true
snapshot_lvm_unmount_all: false
snapshot_lvm_mount_origin: false
snapshot_lvm_verify_only: false
__snapshot_failed_changed: false

- name: Remove the snapshot LVs
Expand Down
5 changes: 5 additions & 0 deletions tests/tests_mount_verify_fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
snapshot_lvm_lv: lv1
snapshot_lvm_mountpoint: "{{ test_mnt_parent ~ '/lv1_mp' }}"
snapshot_lvm_mountpoint_create: true
snapshot_lvm_all_vgs: false
snapshot_lvm_unmount_all: false
snapshot_lvm_mount_origin: false
snapshot_lvm_verify_only: false
__snapshot_failed_changed: false

- name: Verify snapshot is mounted for lv1
include_role:
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_no_space_fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
__snapshot_failed_msg: Role did not fail with no space error
__snapshot_failed_params:
snapshot_lvm_percent_space_required: 15
snapshot_all: true
snapshot_lvm_all_vgs: true
snapshot_lvm_snapset_name: snapset1
snapshot_lvm_action: snapshot
__snapshot_failed_changed: false
Expand Down
10 changes: 5 additions & 5 deletions tests/verify-role-failed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__snapshot_failed_params.get('snapshot_lvm_percent_space_required')
}}"
snapshot_lvm_all_vgs: "{{
__snapshot_failed_params.get('snapshot_all')
__snapshot_failed_params.get('snapshot_lvm_all_vgs') | d(false)
}}"
snapshot_lvm_snapset_name: "{{
__snapshot_failed_params.get('snapshot_lvm_snapset_name')
Expand All @@ -26,7 +26,7 @@
__snapshot_failed_params.get('snapshot_lvm_action')
}}"
snapshot_lvm_verify_only: "{{
__snapshot_failed_params.get('snapshot_lvm_verify_only')
__snapshot_failed_params.get('snapshot_lvm_verify_only') | d(false)
}}"
snapshot_lvm_vg: "{{
__snapshot_failed_params.get('snapshot_lvm_vg')
Expand All @@ -35,13 +35,13 @@
__snapshot_failed_params.get('snapshot_lvm_lv')
}}"
snapshot_lvm_mount_origin: "{{
__snapshot_failed_params.get('snapshot_lvm_mount_origin')
__snapshot_failed_params.get('snapshot_lvm_mount_origin') | d(false)
}}"
snapshot_lvm_mountpoint_create: "{{
__snapshot_failed_params.get('snapshot_lvm_mountpoint_create')
__snapshot_failed_params.get('snapshot_lvm_mountpoint_create') | d(false)
}}"
snapshot_lvm_unmount_all: "{{
__snapshot_failed_params.get('snapshot_lvm_unmount_all')
__snapshot_failed_params.get('snapshot_lvm_unmount_all') | d(false)
}}"
snapshot_lvm_mountpoint: "{{
__snapshot_failed_params.get('snapshot_lvm_mountpoint')
Expand Down

0 comments on commit d5391b8

Please sign in to comment.