Class: SaucelabsAdapter::SauceTunnel
- Inherits:
-
Tunnel
- Object
- Tunnel
- SaucelabsAdapter::SauceTunnel
show all
- Includes:
- Utilities
- Defined in:
- lib/saucelabs_adapter/tunnels/sauce_tunnel.rb
Constant Summary
collapse
- DEFAULT_TUNNEL_STARTUP_TIMEOUT =
240
Instance Method Summary
collapse
Methods included from Utilities
#debug, #diagnostics_prefix, #find_unused_port, #kill_mongrel_if_needed, #raise_with_message, #say, #setup_tunnel, #start_mongrel, #teardown_tunnel
Methods inherited from Tunnel
factory, #initialize
Instance Method Details
#shutdown ⇒ Object
28
29
30
31
32
33
|
# File 'lib/saucelabs_adapter/tunnels/sauce_tunnel.rb', line 28
def shutdown
say "Shutting down tunnel to Saucelabs..."
teardown_ssh_reverse_tunnel
shutdown_tunnel_machine
say "done."
end
|
#start_tunnel ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/saucelabs_adapter/tunnels/sauce_tunnel.rb', line 15
def start_tunnel
connect_to_rest_api
say "Setting up tunnel from Saucelabs (#{@se_config.application_address}:#{@se_config.application_port}) to localhost:#{@se_config.tunnel_to_localhost_port} (timeout #{tunnel_startup_timeout}s)..."
boot_tunnel_machine
setup_ssh_reverse_tunnel
say "Tunnel ID #{@tunnel_id} for #{@se_config.application_address} is up."
end
|
#tunnel_startup_timeout ⇒ Object
24
25
26
|
# File 'lib/saucelabs_adapter/tunnels/sauce_tunnel.rb', line 24
def tunnel_startup_timeout
(@se_config.tunnel_startup_timeout || DEFAULT_TUNNEL_STARTUP_TIMEOUT).to_i
end
|