Skip to content

Commit

Permalink
add test cases for bsc#1066386 (Windows is properly resized)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfeldt committed Dec 22, 2017
1 parent 732a57f commit bcef3bf
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/data/devicegraphs/output/windows-pc-50GiB-gpt-sep-home.yml
@@ -0,0 +1,45 @@
---
- disk:
name: "/dev/sda"
size: 50 GiB
block_size: 0.5 KiB
io_size: 0 B
min_grain: 1 MiB
align_ofs: 0 B
partition_table: gpt
partitions:
- partition:
size: 36172783.5 KiB (34.50 GiB)
name: "/dev/sda1"
type: primary
id: windows_basic_data
file_system: ntfs
label: windows
- partition:
size: 12 GiB
name: "/dev/sda2"
type: primary
id: linux
file_system: btrfs
mount_point: "/"
btrfs:
subvolumes: []
- partition:
size: 1 MiB
name: "/dev/sda3"
type: primary
id: bios_boot
- partition:
size: 0.5 GiB
name: "/dev/sda4"
type: primary
id: swap
file_system: swap
mount_point: swap
- partition:
size: 3146735.5 KiB (3.00 GiB)
name: "/dev/sda5"
type: primary
id: linux
file_system: xfs
mount_point: "/home"
40 changes: 40 additions & 0 deletions test/data/devicegraphs/output/windows-pc-50GiB-gpt.yml
@@ -0,0 +1,40 @@
---
- disk:
name: "/dev/sda"
size: 50 GiB
block_size: 0.5 KiB
io_size: 0 B
min_grain: 1 MiB
align_ofs: 0 B
partition_table: gpt
partitions:
- partition:
size: 8385519.5 KiB (8.00 GiB)
name: "/dev/sda1"
type: primary
id: windows_basic_data
file_system: ntfs
label: windows
- partition:
size: 40 GiB
name: "/dev/sda2"
type: primary
id: linux
file_system: btrfs
mount_point: "/"
btrfs:
subvolumes: []
- partition:
size: 1 MiB
name: "/dev/sda3"
type: primary
id: bios_boot
- partition:
size: 2098159.5 KiB (2.00 GiB)
name: "/dev/sda4"
type: primary
id: swap
file_system: swap
mount_point: swap
- free:
size: 16.5 KiB
13 changes: 13 additions & 0 deletions test/data/devicegraphs/windows-pc-50GiB-gpt.yml
@@ -0,0 +1,13 @@
---
- disk:
name: /dev/sda
size: 50 GiB
partition_table: gpt
partitions:

- partition:
size: 51198 MiB
name: /dev/sda1
id: windows_basic_data
file_system: ntfs
label: windows
11 changes: 11 additions & 0 deletions test/y2storage/proposal_scenarios_x86_test.rb
Expand Up @@ -101,6 +101,17 @@
include_examples "all proposed layouts"
end

context "in a 50 GiB Windows-only PC with GPT partition table" do
let(:scenario) { "windows-pc-50GiB-gpt" }
let(:windows_partitions) { [partition_double("/dev/sda1")] }
let(:resize_info) do
instance_double("Y2Storage::ResizeInfo", resize_ok?: true, min_size: 1.GiB)
end

# essential part of the example: Windows partition has been resized
include_examples "partition-based proposed layouts"
end

context "in a windows/linux multiboot PC with GPT partition table" do
let(:scenario) { "windows-linux-multiboot-pc-gpt" }

Expand Down

0 comments on commit bcef3bf

Please sign in to comment.