@@ -219,40 +219,32 @@ test_storage_local_volume_handling() {
219
219
incus storage volume snapshot create " ${source_pool} " vol5
220
220
incus storage volume set " ${source_pool} " vol5 user.foo=snap1vol5
221
221
incus storage volume snapshot create " ${source_pool} " vol5
222
- incus storage volume set " ${source_pool} " vol5 user.foo=snapremovevol5
223
- incus storage volume snapshot create " ${source_pool} " vol5 snapremove
224
222
incus storage volume set " ${source_pool} " vol5 user.foo=postsnap1vol5
225
223
226
- # create storage volume with user config differing over snapshots and additional snapshot than vol5
227
- incus storage volume create " ${source_pool} " vol6 --type=block size=4194304
228
- incus storage volume set " ${source_pool} " vol6 user.foo=snap0vol6
229
- incus storage volume snapshot create " ${source_pool} " vol6
230
- incus storage volume set " ${source_pool} " vol6 user.foo=snap1vol6
231
- incus storage volume snapshot create " ${source_pool} " vol6
232
- incus storage volume set " ${source_pool} " vol6 user.foo=snap2vol6
233
- incus storage volume snapshot create " ${source_pool} " vol6
234
- incus storage volume set " ${source_pool} " vol6 user.foo=postsnap1vol6
235
-
236
224
# copy to new volume destination with refresh flag
237
225
incus storage volume copy --refresh " ${source_pool} /vol5" " ${target_pool} /vol5"
238
226
239
227
# check snapshot volumes (including config) were copied
240
228
incus storage volume get " ${target_pool} " vol5 user.foo | grep -Fx " postsnap1vol5"
241
229
incus storage volume get " ${target_pool} " vol5/snap0 user.foo | grep -Fx " snap0vol5"
242
230
incus storage volume get " ${target_pool} " vol5/snap1 user.foo | grep -Fx " snap1vol5"
243
- incus storage volume get " ${target_pool} " vol5/snapremove user.foo | grep -Fx " snapremovevol5"
231
+
232
+ # create additional snapshot on source_pool and one on target_pool
233
+ incus storage volume snapshot create " ${source_pool} " vol5 postsnap1vol5
234
+ incus storage volume set " ${target_pool} " vol5 user.foo=snapremovevol5
235
+ incus storage volume snapshot create " ${target_pool} " vol5 snapremove
244
236
245
237
# incremental copy to existing volume destination with refresh flag
246
- incus storage volume copy --refresh " ${source_pool} /vol6 " " ${target_pool} /vol5"
238
+ incus storage volume copy --refresh " ${source_pool} /vol5 " " ${target_pool} /vol5"
247
239
248
240
# check snapshot volumes (including config) was overridden from new source and that missing snapshot is
249
241
# present and that the missing snapshot has been removed.
250
- # Note: Due to a known issue we are currently only diffing the snapshots by name, so infact existing
251
- # snapshots of the same name won't be overwritten even if their config or contents is different.
252
- incus storage volume get " ${target_pool} " vol5 user.foo | grep -Fx " postsnap1vol5 "
242
+ # Note: We are currently diffing the snapshots by name and creation date , so infact existing
243
+ # snapshots of the same name and cretion date won't be overwritten even if their config or contents is different.
244
+ incus storage volume get " ${target_pool} " vol5 user.foo | grep -Fx " snapremovevol5 "
253
245
incus storage volume get " ${target_pool} " vol5/snap0 user.foo | grep -Fx " snap0vol5"
254
246
incus storage volume get " ${target_pool} " vol5/snap1 user.foo | grep -Fx " snap1vol5"
255
- incus storage volume get " ${target_pool} " vol5/snap2 user.foo | grep -Fx " snap2vol6 "
247
+ incus storage volume get " ${target_pool} " vol5/postsnap1vol5 user.foo | grep -Fx " postsnap1vol5 "
256
248
! incus storage volume get " ${target_pool} " vol5/snapremove user.foo || false
257
249
258
250
# copy ISO custom volumes
@@ -272,7 +264,6 @@ test_storage_local_volume_handling() {
272
264
incus storage volume delete " ${target_pool} " vol4
273
265
incus storage volume delete " ${source_pool} " vol5
274
266
incus storage volume delete " ${target_pool} " vol5
275
- incus storage volume delete " ${source_pool} " vol6
276
267
incus storage volume delete " ${target_pool} " iso1
277
268
incus storage volume delete " ${target_pool} " iso2
278
269
rm -f foo.iso
0 commit comments