Begin to refactor websocket handling and implement test
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
This commit is contained in:

committed by
Sebastian Serth

parent
3cf70a33d8
commit
1546f70818
@ -37,16 +37,19 @@ class Container
|
||||
response
|
||||
end
|
||||
|
||||
def execute_command_interactively(command)
|
||||
def execute_interactively(command)
|
||||
websocket_url = execute_command(command)[:websocket_url]
|
||||
@socket = Faye::WebSocket::Client.new(websocket_url, [], ping: 0.1)
|
||||
# Faye::WebSocket::Client.new(socket_url, [], headers: headers, ping: 0.1)
|
||||
end
|
||||
|
||||
def destroy
|
||||
Faraday.delete container_url
|
||||
end
|
||||
|
||||
def status
|
||||
parse(Faraday.get(container_url))[:status]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def container_url
|
||||
|
Reference in New Issue
Block a user