diff options
author | Azul <azul@riseup.net> | 2016-06-30 11:23:45 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-06-30 12:04:07 +0200 |
commit | 0491e79c4e5f16d38cf87e53290394e1eccfa2e9 (patch) | |
tree | 56d0aff1fc8ca1bbd11b09bc6929f00132467898 /test/integration/hkp_test.rb | |
parent | 4132d6e6db3755334ace352165991487802c6b82 (diff) |
Trying to replace EM base server with reel
some tests are still broken. But at least they are running now.
Diffstat (limited to 'test/integration/hkp_test.rb')
-rw-r--r-- | test/integration/hkp_test.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/test/integration/hkp_test.rb b/test/integration/hkp_test.rb index a824a3f..cbb8190 100644 --- a/test/integration/hkp_test.rb +++ b/test/integration/hkp_test.rb @@ -1,6 +1,6 @@ require 'test_helper' require 'nickserver/hkp/source' -require 'nickserver/adapters/em_http' +require 'nickserver/adapters/celluloid_http' class HkpTest < Minitest::Test @@ -89,9 +89,9 @@ class HkpTest < Minitest::Test ca_file = file_path('mayfirst-ca.pem') real_network do - stub_config(:hkp_url, hkp_url) do - stub_config(:hkp_ca_file, ca_file) do - #stub_config(:hkp_ca_file, file_path('autistici-ca.pem')) do + config.stub(:hkp_url, hkp_url) do + config.stub(:hkp_ca_file, ca_file) do + #config.stub(:hkp_ca_file, file_path('autistici-ca.pem')) do assert File.exist?(Nickserver::Config.hkp_ca_file) uid = 'elijah@riseup.net' assert_key_info_for_uid uid do |keys| @@ -112,26 +112,20 @@ class HkpTest < Minitest::Test end def assert_response_for_uid(uid, &block) - EM.run do - Nickserver::Hkp::Source.new(adapter).query uid do |response| - yield response - EM.stop - end + Nickserver::Hkp::Source.new(adapter).query uid do |response| + yield response end end def assert_key_info_for_uid(uid, &block) - EM.run do - Nickserver::Hkp::Source.new(adapter).search uid do |status, keys| - assert_equal 200, status - yield keys - EM.stop - end + Nickserver::Hkp::Source.new(adapter).search uid do |status, keys| + assert_equal 200, status + yield keys end end def adapter - Nickserver::Adapters::EmHttp.new + Nickserver::Adapters::CelluloidHttp.new end def fetch_key_info(body_source, uid, &block) |