Class: Orca::MockExecutionContext

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

Instance Attribute Summary

Attributes inherited from ExecutionContext

#log, #node

Instance Method Summary collapse

Methods inherited from ExecutionContext

#apply, #as, #binary_exists?, #for_user, #initialize, #local, #remote, #run_local, #template, #trigger

Constructor Details

This class inherits a constructor from Orca::ExecutionContext

Instance Method Details

#download(from, to) ⇒ Object



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

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

#remove(path) ⇒ Object



121
122
123
# File 'lib/orca/execution_context.rb', line 121

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

#run(cmd) ⇒ Object



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

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

#setstat(path, opts) ⇒ Object



129
130
131
# File 'lib/orca/execution_context.rb', line 129

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

#stat(path) ⇒ Object



125
126
127
# File 'lib/orca/execution_context.rb', line 125

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

#sudo(cmd) ⇒ Object



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

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

#upload(from, to) ⇒ Object



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

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