Skip to content

Commit

Permalink
Create a file in the test fs to actually detect data loss
Browse files Browse the repository at this point in the history
  • Loading branch information
pcahyna committed Oct 15, 2019
1 parent 611553a commit a597f0f
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions tests/tests_disk_errors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
become: true
vars:
mount_location: '/opt/test1'
testfile: "{{ mount_location }}/quux"

tasks:
- include_role:
Expand Down Expand Up @@ -50,19 +51,24 @@
# that: blivet_output.failed | bool
# msg: "Expected error message not found for missing disk"

- name: Create a file system on disk
include_role:
name: storage
vars:
storage_volumes:
- name: test1
type: disk
fs_type: 'ext4'
disks: "{{ unused_disks }}"
mount_point: "{{ mount_location }}"

- name: create a file
file:
path: "{{ testfile }}"
state: touch

- name: Test for correct handling of safe_mode
block:
- name: Create a file system on disk
include_role:
name: storage
vars:
storage_volumes:
- name: test1
type: disk
fs_type: 'ext4'
disks: "{{ unused_disks }}"

- name: Try to replace the file system on disk in safe mode
include_role:
name: storage
Expand Down

0 comments on commit a597f0f

Please sign in to comment.