Project

General

Profile

Actions

action #61991

closed

[y][functional] Add test module for 'snapper create: branch from different snapshot'

Added by oorlov over 4 years ago. Updated about 4 years ago.

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).

  1. Create snapshot with --read-write parameter (e.g. `snapper create --read-write -d "Snapshot with read-write")
  2. 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).

  1. Create new snapshot (e.g. `snapper create -d "Parent Snapshot");
  2. Create another snapshot, using recently created one as a parent (e.g. snapper create --from <number of parent> -d "Child Snapshot);
  3. 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).

  1. Note the number of the existing snapshots (e.g. snapper list);
  2. Execute snapper --from command with the snapshot number that does not exist (e.g. snapper --from 100);
  3. Verify the output (Expected result: Snapshot '100' not found).

Commands, that might be useful while implementing the test:

  1. Show snapper snapshots list: snapper list
  2. Show snapshots with btrfs: btrfs subvolume list / -s
  3. Show parameters of snapshot: btrfs subvolume show /.snapshots/4/snapshot
  4. Change read-write to read-only: btrfs property set /.snapshots/4/snapshot ro true
  5. Check parent_uuid: btrfs subvolume list / -qu

Related issues 1 (0 open1 closed)

Related to openQA Tests - action #60605: [functional][y][SLE-7373][SLE-7333][timeboxed:30h] snapper create: branch from different snapshotResolvedoorlov2019-12-042020-01-14

Actions
Actions

Also available in: Atom PDF