Skip to content

Commit ac91d2f

Browse files
committed
(FM-4614) remove --graph and added documentation for lib
1 parent 7593dbd commit ac91d2f

25 files changed

+32
-30
lines changed

tests/beaker/lib/lvm_helper.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
#
55
# * +resource_type+ - resorce type, i.e 'physical_volume', 'volume_group', 'logical_volume', or 'filesystem'
66
# * +resource_name+ - The name of resource type, i.e '/dev/sdb' for physical volume, vg_1234 for volume group
7-
#
7+
# * +vg+ - volume group name associated with logical volume (if any)
8+
# * +properties+ - a matching string or regular expression in logical volume properties
89
# ==== Returns
910
#
1011
# +nil+
@@ -13,7 +14,7 @@
1314
# assert_match failure message
1415
# ==== Examples
1516
#
16-
# verify_if_created?(agent, 'physical_volume', /dev/sdb')
17+
# verify_if_created?(agent, 'physical_volume', /dev/sdb', VolumeGroup_123, "Size 7GB")
1718
def verify_if_created?(agent, resource_type, resource_name, vg=nil, properties=nil)
1819
case resource_type
1920
when 'physical_volume'
@@ -25,6 +26,7 @@ def verify_if_created?(agent, resource_type, resource_name, vg=nil, properties=n
2526
assert_match(/#{resource_name}/, result.stdout, 'Unexpected error was detected')
2627
end
2728
when 'logical_volume'
29+
fail_test "Error: missing volume group that the logical volume is associated with" unless vg
2830
on(agent, "lvdisplay /dev/#{vg}/#{resource_name}") do |result|
2931
assert_match(/#{resource_name}/, result.stdout, 'Unexpected error was detected')
3032
if properties

tests/beaker/tests/create_lv_with_param_alloc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
step 'Run Puppet Agent to create logical volumes'
7474
confine_block(:except, :roles => %w{master dashboard database}) do
7575
agents.each do |agent|
76-
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
76+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
7777
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
7878
end
7979

tests/beaker/tests/create_lv_with_param_initial_size.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
step 'Run Puppet Agent to create logical volumes'
3939
confine_block(:except, :roles => %w{master dashboard database}) do
4040
agents.each do |agent|
41-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
41+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4242
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4343
end
4444

tests/beaker/tests/create_lv_with_param_name.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
step 'Run Puppet Agent to create logical volumes'
4444
confine_block(:except, :roles => %w{master dashboard database}) do
4545
agents.each do |agent|
46-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
46+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4747
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4848
end
4949

tests/beaker/tests/create_lv_with_param_no_sync.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
step 'Run Puppet Agent to create logical volumes'
4040
confine_block(:except, :roles => %w{master dashboard database}) do
4141
agents.each do |agent|
42-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
42+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4343
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4444
end
4545

tests/beaker/tests/create_lv_with_param_readahead.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
step 'Run Puppet Agent to create logical volumes'
4040
confine_block(:except, :roles => %w{master dashboard database}) do
4141
agents.each do |agent|
42-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
42+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4343
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4444
end
4545

tests/beaker/tests/create_lv_with_param_region_size.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
step 'Run Puppet Agent to create logical volumes'
4141
confine_block(:except, :roles => %w{master dashboard database}) do
4242
agents.each do |agent|
43-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
43+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4444
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4545
end
4646

tests/beaker/tests/create_lv_with_param_size_is_minsize.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
step 'Run Puppet Agent to create logical volumes'
4545
confine_block(:except, :roles => %w{master dashboard database}) do
4646
agents.each do |agent|
47-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
47+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4848
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4949
end
5050

tests/beaker/tests/create_lv_with_param_stripes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
step 'Run Puppet Agent to create logical volumes'
4040
confine_block(:except, :roles => %w{master dashboard database}) do
4141
agents.each do |agent|
42-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
42+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4343
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4444
end
4545

tests/beaker/tests/create_lv_with_param_stripesize.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
step 'Run Puppet Agent to create logical volumes'
4141
confine_block(:except, :roles => %w{master dashboard database}) do
4242
agents.each do |agent|
43-
on(agent, puppet('agent -t --graph --environment production'), :acceptable_exit_codes => [0,2]) do |result|
43+
on(agent, puppet('agent -t --environment production'), :acceptable_exit_codes => [0,2]) do |result|
4444
assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
4545
end
4646

0 commit comments

Comments
 (0)