Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/lvol/tasks/test_thinpool.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 # Regression tests for thin-pool creation with percentage-based sizes (GH-11923)
7
8 - name: Create thin pool with percentage of VG size
9 community.general.lvol:
10 vg: testvg1
11 thinpool: testthinpool1
12 size: 20%VG
13 register: thinpool_pct_vg_create
14
15 - name: Assert thin pool with percentage of VG created
16 assert:
17 that:
18 - thinpool_pct_vg_create is success
19 - thinpool_pct_vg_create is changed
20
21 - name: Create thin pool with percentage of VG size - idempotency
22 community.general.lvol:
23 vg: testvg1
24 thinpool: testthinpool1
25 size: 20%VG
26 register: thinpool_pct_vg_idempotent
27
28 - name: Assert thin pool with percentage of VG creation is idempotent
29 assert:
30 that:
31 - thinpool_pct_vg_idempotent is success
32 - thinpool_pct_vg_idempotent is not changed
33
34 - name: Create thin pool with percentage of free space
35 community.general.lvol:
36 vg: testvg2
37 thinpool: testthinpool2
38 size: 20%FREE
39 register: thinpool_pct_free_create
40
41 - name: Assert thin pool with percentage of free space created
42 assert:
43 that:
44 - thinpool_pct_free_create is success
45 - thinpool_pct_free_create is changed
46
47 - name: Create thin pool with absolute size
48 community.general.lvol:
49 vg: testvg2
50 thinpool: testthinpool3
51 size: 4m
52 register: thinpool_abs_create
53
54 - name: Assert thin pool with absolute size created
55 assert:
56 that:
57 - thinpool_abs_create is success
58 - thinpool_abs_create is changed
59
60 - name: Create thin pool with absolute size - idempotency
61 community.general.lvol:
62 vg: testvg2
63 thinpool: testthinpool3
64 size: 4m
65 shrink: false
66 register: thinpool_abs_idempotent
67
68 - name: Assert thin pool with absolute size creation is idempotent
69 assert:
70 that:
71 - thinpool_abs_idempotent is success
72 - thinpool_abs_idempotent is not changed
73
74 - name: Create thin volume inside thin pool
75 community.general.lvol:
76 vg: testvg1
77 lv: testthinvol1
78 thinpool: testthinpool1
79 size: 5m
80 register: thinvol_create
81
82 - name: Assert thin volume created
83 assert:
84 that:
85 - thinvol_create is success
86 - thinvol_create is changed
87
88 - name: Create thin volume inside thin pool - idempotency
89 community.general.lvol:
90 vg: testvg1
91 lv: testthinvol1
92 thinpool: testthinpool1
93 size: 5m
94 shrink: false
95 register: thinvol_idempotent
96
97 - name: Assert thin volume creation is idempotent
98 assert:
99 that:
100 - thinvol_idempotent is success
101 - thinvol_idempotent is not changed