diff options
author | azul <azul@riseup.net> | 2016-10-17 08:58:08 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2016-10-17 08:58:08 +0000 |
commit | 5dae257996c480c3f7b5a220fcaf97812a560466 (patch) | |
tree | 2edc9f7b40d7b04e4cf739e6e92b200f93cd57e7 /test/remote | |
parent | 6721f0732facd87404eecc288357fd1bd0de48cf (diff) | |
parent | 5967c4a568aff2c5e73e3ab933aa68d25387aeb1 (diff) |
Merge branch 'feature/log-requests-and-errors' into 'master'
Log requests and errors
proper logging
See merge request !6
Diffstat (limited to 'test/remote')
-rw-r--r-- | test/remote/celluloid_http_test.rb | 15 | ||||
-rw-r--r-- | test/remote/hkp_source_test.rb | 15 | ||||
-rw-r--r-- | test/remote/nicknym_source_test.rb | 13 |
3 files changed, 10 insertions, 33 deletions
diff --git a/test/remote/celluloid_http_test.rb b/test/remote/celluloid_http_test.rb index 46a5259..da5f5d7 100644 --- a/test/remote/celluloid_http_test.rb +++ b/test/remote/celluloid_http_test.rb @@ -1,22 +1,15 @@ require 'test_helper' +require 'support/celluloid_test' require 'nickserver/adapters/celluloid_http' -class Nickserver::Adapters::CelluloidHttpTest < Minitest::Test - - def setup - super - Celluloid.boot - end - - def teardown - Celluloid.shutdown - super - end +class Nickserver::Adapters::CelluloidHttpTest < CelluloidTest def test_https_for_hkp url = Nickserver::Config.hkp_url status, _body = adapter.get url assert_equal 404, status + rescue HTTP::ConnectionError => e + skip "could not talk to hkp server: #{e}" end protected diff --git a/test/remote/hkp_source_test.rb b/test/remote/hkp_source_test.rb index aabc4d3..103b8ad 100644 --- a/test/remote/hkp_source_test.rb +++ b/test/remote/hkp_source_test.rb @@ -1,17 +1,8 @@ require 'test_helper' +require 'support/celluloid_test' require 'nickserver/hkp/source' -class RemoteHkpSourceTest < Minitest::Test - - def setup - super - Celluloid.boot - end - - def teardown - Celluloid.shutdown - super - end +class RemoteHkpSourceTest < CelluloidTest def test_key_info uid = 'elijah@riseup.net' @@ -45,5 +36,7 @@ class RemoteHkpSourceTest < Minitest::Test assert_equal 200, status yield keys end + rescue HTTP::ConnectionError => e + skip "could not talk to hkp server: #{e}" end end diff --git a/test/remote/nicknym_source_test.rb b/test/remote/nicknym_source_test.rb index b38a991..e2896ca 100644 --- a/test/remote/nicknym_source_test.rb +++ b/test/remote/nicknym_source_test.rb @@ -1,21 +1,12 @@ require 'test_helper' +require 'support/celluloid_test' require 'nickserver/nicknym/source' require 'nickserver/email_address' # # Please note the Readme.md file in this directory # -class RemoteNicknymSourceTest < Minitest::Test - - def setup - super - Celluloid.boot - end - - def teardown - Celluloid.shutdown - super - end +class RemoteNicknymSourceTest < CelluloidTest def test_availablility_check source.available_for? 'mail.bitmask.net' |