Actions
action #61991
closed[y][functional] Add test module for 'snapper create: branch from different snapshot'
Status:
Resolved
Priority:
Normal
Assignee:
Category:
New test
Target version:
SUSE QA - Milestone 32
Start date:
2020-01-10
Due date:
2020-04-21
% Done:
0%
Estimated time:
3.00 h
Difficulty:
Description
See https://jira.suse.com/browse/SLE-7373 and https://jira.suse.com/browse/SLE-7333 and related progress ticket in case more details is needed.
Automated tests¶
Test 1 (Read-write snapshot).¶
Pre-condition: Install OS with btrfs File System and snapshots enabled (or use one of already installed).
- Create snapshot with
--read-write
parameter (e.g. `snapper create --read-write -d "Snapshot with read-write") - Verify, that the snapshot does not have
readonly
flag (e.g.btrfs subvolume show /.snapshots/4/snapshot
and then check that "Flags:" is "-", because in case if it is read-only, the "Flags: readonly" will be shown).
Test 2 (Create snapshot from another one).¶
Pre-condition: Install OS with btrfs File System and snapshots enabled (or use one of already installed).
- Create new snapshot (e.g. `snapper create -d "Parent Snapshot");
- Create another snapshot, using recently created one as a parent (e.g.
snapper create --from <number of parent> -d "Child Snapshot
); - Verify, that the child snapshot's parent_uuid is the same as parent's uuid (e.g.
btrfs subvolume list / -qu
).
Test 3 (Message is shown if try to create child snapshot from non existing parent one)¶
Pre-condition: Install OS with btrfs File System and snapshots enabled (or use one of already installed).
- Note the number of the existing snapshots (e.g.
snapper list
); - Execute
snapper --from
command with the snapshot number that does not exist (e.g.snapper --from 100
); - Verify the output (Expected result: Snapshot '100' not found).
Commands, that might be useful while implementing the test:¶
- Show snapper snapshots list:
snapper list
- Show snapshots with btrfs:
btrfs subvolume list / -s
- Show parameters of snapshot:
btrfs subvolume show /.snapshots/4/snapshot
- Change read-write to read-only:
btrfs property set /.snapshots/4/snapshot ro true
- Check parent_uuid:
btrfs subvolume list / -qu
Actions