features/step_definitions/dev_steps.rb in nagios-zfs-0.1.1 vs features/step_definitions/dev_steps.rb in nagios-zfs-0.2.0

- old
+ new

@@ -1,8 +1,17 @@ +Before do + @aruba_timeout_seconds = 10 +end + Given(/^the zpool "(.*?)" has a capacity of (\d+)%$/) do |name, capacity| cmd = "zpool list -H -o name,cap #{name}" out = "#{name}\t#{capacity}%\n" double_cmd(cmd, :puts => out) +end + +Given(/^the health from zpool "(.*?)" is "(.*?)"$/) do |name, health| + cmd = "zpool list -H -o health #{name}" + double_cmd(cmd, :puts => "#{health}\n") end Then(/^the status should be (unknown|critical|warning|ok)$/) do |status| exit_status = case status