|
2 | 2 | require 'lvm_helper' |
3 | 3 | require 'securerandom' |
4 | 4 |
|
5 | | -test_name "FM-4579 - C96574 - create logical volume without parameter 'alloc'" |
| 5 | +test_name "FM-4614 - C96574 - create logical volume parameter 'alloc'" |
6 | 6 |
|
7 | 7 | #initilize |
8 | 8 | pv = '/dev/sdc' |
9 | | -vg = ("VolumeGroup_" + SecureRandom.hex(2)) |
10 | | -lv = [("LogicalVolume_" + SecureRandom.hex(3)), ("LogicalVolume_" + SecureRandom.hex(3)), \ |
11 | | -("LogicalVolume_" + SecureRandom.hex(3)), ("LogicalVolume_" + SecureRandom.hex(3)), ("LogicalVolume_" + SecureRandom.hex(3))] |
| 9 | +vg = "VolumeGroup_" + SecureRandom.hex(2) |
| 10 | +lv = ["LogicalVolume_" + SecureRandom.hex(3), "LogicalVolume_" + SecureRandom.hex(3), \ |
| 11 | + "LogicalVolume_" + SecureRandom.hex(3), "LogicalVolume_" + SecureRandom.hex(3), \ |
| 12 | + "LogicalVolume_" + SecureRandom.hex(3)] |
12 | 13 |
|
13 | 14 | # Teardown |
14 | 15 | teardown do |
|
72 | 73 | step 'Run Puppet Agent to create logical volumes' |
73 | 74 | confine_block(:except, :roles => %w{master dashboard database}) do |
74 | 75 | agents.each do |agent| |
75 | | - on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result| |
| 76 | + on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result| |
76 | 77 | assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!') |
77 | 78 | end |
78 | 79 |
|
79 | | - step "Verify the logical volume is created: #{lv}" |
80 | | - verify_if_created?(agent, 'logical_volume', lv) |
| 80 | + step "Verify the logical volumes are successfully created: #{lv}" |
| 81 | + verify_if_created?(agent, 'logical_volume', lv[0], vg, "Allocation\s+anywhere") |
| 82 | + verify_if_created?(agent, 'logical_volume', lv[1], vg, "Allocation\s+contiguous") |
| 83 | + verify_if_created?(agent, 'logical_volume', lv[2], vg, "Allocation\s+cling") |
| 84 | + verify_if_created?(agent, 'logical_volume', lv[3], vg, "Allocation\s+inherit") |
| 85 | + verify_if_created?(agent, 'logical_volume', lv[4], vg, "Allocation\s+normal") |
81 | 86 | end |
82 | 87 | end |
0 commit comments