Implement `` condition keyword (shell cmd status)

This commit is contained in:
Thibault Jouan
2014-03-08 19:43:41 +00:00
parent a2ca62e7f8
commit 7c6ac4c9d8
6 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
module Producer
module Core
module Tests
class ShellCommandStatus < Test
def verify
remote.execute(command)
true
rescue RemoteCommandExecutionError
false
end
def command
arguments.first
end
end
end
end
end