changes in gemfile

This commit is contained in:
yqbk
2016-05-30 15:18:02 +02:00
5 changed files with 11 additions and 5 deletions

View File

@ -69,10 +69,13 @@ class DockerClient
# todo separate stderr
query_params = 'logs=0&stream=1&' + (stderr ? 'stderr=1' : 'stdout=1&stdin=1')
# Should be hosts instead of ws_hosts, right?
client_params = DockerClient.config['host'] + '/containers/' + @container.id + '/attach/ws?' + query_params
# Headers are required by Docker
headers = {'Origin' => 'http://localhost'}
socket = Faye::WebSocket::Client.new(DockerClient.config['ws_host'] + '/containers/' + @container.id + '/attach/ws?' + query_params, [], :headers => headers)
socket = Faye::WebSocket::Client.new(client_params, [], :headers => headers)
socket.on :error do |event|
Rails.logger.info "Websocket error: " + event.message

View File

@ -1,4 +1,4 @@
class Xikolo::Client
class Xikolo::3Client
def self.get_user(user_id)
params = {:user_id => user_id}
response = get_request(user_profile_url(user_id), params)

View File

@ -143,8 +143,9 @@ describe DockerContainerPool do
after(:each) { described_class.start_refill_task }
# changed from false to true
it 'creates an asynchronous task' do
expect(Concurrent::TimerTask).to receive(:new).with(execution_interval: interval, run_now: false, timeout_interval: timeout).and_call_original
expect(Concurrent::TimerTask).to receive(:new).with(execution_interval: interval, run_now: true, timeout_interval: timeout).and_call_original
end
it 'executes the task' do

View File

@ -8,9 +8,10 @@ describe JunitAdapter do
let(:count) { 42 }
let(:failed) { 25 }
let(:stdout) { "FAILURES!!!\nTests run: #{count}, Failures: #{failed}" }
let(:error_matches) { [] }
it 'returns the correct numbers' do
expect(adapter.parse_output(stdout: stdout)).to eq(count: count, failed: failed)
expect(adapter.parse_output(stdout: stdout)).to eq(count: count, failed: failed, error_messages: error_matches)
end
end

View File

@ -4,11 +4,12 @@ describe PyUnitAdapter do
let(:adapter) { described_class.new }
let(:count) { 42 }
let(:failed) { 25 }
let(:error_matches) { [] }
let(:stderr) { "Ran #{count} tests in 0.1s\n\nFAILED (failures=#{failed})" }
describe '#parse_output' do
it 'returns the correct numbers' do
expect(adapter.parse_output(stderr: stderr)).to eq(count: count, failed: failed)
expect(adapter.parse_output(stderr: stderr)).to eq(count: count, failed: failed, error_messages: error_matches)
end
end
end