Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of ruby-pcp-client 0.2.0 #339

Merged
merged 3 commits into from
Feb 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acceptance/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.19')
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || "~> 0.2")
gem 'rake'
gem 'scooter', '~> 3.1.1'
gem 'pcp-client', :source => 'https://rubygems.org'
gem 'pcp-client', '~> 0.2.0'

group(:test) do
gem 'rspec', '~> 2.14.0', :require => false
Expand Down
6 changes: 4 additions & 2 deletions acceptance/lib/pxp-agent/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'pxp-agent/config_helper.rb'
require 'pcp/client'
require 'pcp/simple_logger'
require 'net/http'
require 'openssl'
require 'json'
Expand Down Expand Up @@ -285,16 +286,17 @@ def connect_pcp_client(broker)
:server => broker_ws_uri(broker),
:ssl_cert => "../test-resources/ssl/certs/controller01.example.com.pem",
:ssl_key => "../test-resources/ssl/private_keys/controller01.example.com.pem",
:logger => PCP::SimpleLogger.new,
:loglevel => logger.is_debug? ? Logger::DEBUG : Logger::WARN
})
connected = client.connect(5)
retries += 1
end
if !connected
raise "Controller PCP client failed to connect with pcp-broker on #{broker} after #{max_retries} attempts"
raise "Controller PCP client failed to connect with pcp-broker on #{broker} after #{max_retries} attempts: #{client.inspect}"
end
if !client.associated?
raise "Controller PCP client failed to associate with pcp-broker on #{broker}"
raise "Controller PCP client failed to associate with pcp-broker on #{broker} #{client.inspect}"
end

client
Expand Down