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, #trigger

Constructor Details

This class inherits a constructor from Orca::ExecutionContext

Instance Method Details

#download(from, to) ⇒ Object



90
91
92
# File 'lib/orca/execution_context.rb', line 90

def download(from, to)
  @node.log('mock-sftp', "DOWLOAD: #{from} => #{to}")
end

#remove(path) ⇒ Object



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

def remove(path)
  @node.log('mock-sftp', "REMOVE: #{path}")
end

#run(cmd) ⇒ Object



76
77
78
79
# File 'lib/orca/execution_context.rb', line 76

def run(cmd)
  @node.log 'mock-execute', cmd
  ''
end

#setstat(path, opts) ⇒ Object



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

def setstat(path, opts)
  @node.log('mock-sftp', "SET: #{path} - #{opts.inspect}")
end

#stat(path) ⇒ Object



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

def stat(path)
  @node.log('mock-sftp', "STAT: #{path}")
end

#sudo(cmd) ⇒ Object



81
82
83
84
# File 'lib/orca/execution_context.rb', line 81

def sudo(cmd)
  @node.log 'mock-execute', "sudo #{cmd}"
  ''
end

#upload(from, to) ⇒ Object



86
87
88
# File 'lib/orca/execution_context.rb', line 86

def upload(from, to)
  @node.log('mock-sftp', "UPLOAD: #{from} => #{to}")
end