Class: Orca::MockExecutionContext

Inherits:
ExecutionContext show all
Defined in:
lib/orca/execution_context.rb

Instance Attribute Summary

Attributes inherited from ExecutionContext

#node

Instance Method Summary collapse

Methods inherited from ExecutionContext

#apply, #binary_exists?, #initialize, #local, #log, #remote, #run_local, #template, #trigger

Constructor Details

This class inherits a constructor from Orca::ExecutionContext

Instance Method Details

#download(from, to) ⇒ Object



106
107
108
# File 'lib/orca/execution_context.rb', line 106

def download(from, to)
  @log.mock_execute("DOWLOAD: #{from} => #{to}")
end

#remove(path) ⇒ Object



110
111
112
# File 'lib/orca/execution_context.rb', line 110

def remove(path)
  @log.mock_execute("REMOVE: #{path}")
end

#run(cmd) ⇒ Object



92
93
94
95
# File 'lib/orca/execution_context.rb', line 92

def run(cmd)
  @log.mock_execute(cmd)
  ''
end

#setstat(path, opts) ⇒ Object



118
119
120
# File 'lib/orca/execution_context.rb', line 118

def setstat(path, opts)
  @log.mock_execute("SET: #{path} - #{opts.inspect}")
end

#stat(path) ⇒ Object



114
115
116
# File 'lib/orca/execution_context.rb', line 114

def stat(path)
  @log.mock_execute("STAT: #{path}")
end

#sudo(cmd) ⇒ Object



97
98
99
100
# File 'lib/orca/execution_context.rb', line 97

def sudo(cmd)
  @log.mock_execute "sudo #{cmd}"
  ''
end

#upload(from, to) ⇒ Object



102
103
104
# File 'lib/orca/execution_context.rb', line 102

def upload(from, to)
  @log.mock_execute("UPLOAD: #{from} => #{to}")
end