From 8a81429f0eb8aa5041d47557d0c5b5359bb959e6 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 May 2016 13:13:30 +0200 Subject: copy over all files from rewritten attempt I started a nickserver from scratch to implement the things that are independent of our choice of stack (eventmachine or other). This commit copies them over and tests both things in parallel. --- test/test_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index d4765bc..842f05f 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -5,6 +5,7 @@ require 'bundler/setup' require 'minitest/autorun' require 'webmock/minitest' require 'nickserver' +require 'minitest/pride' TESTING = true -- cgit v1.2.3 From b28d1eec92fb7d1ec05d37ae13df1d4049d57932 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 May 2016 14:22:00 +0200 Subject: run all tests by default --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 842f05f..c9d8fd4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -28,7 +28,7 @@ class Minitest::Test end def real_network - if ENV['REAL_NET'] == 'true' + unless ENV['ONLY_LOCAL'] == 'true' WebMock.allow_net_connect! yield WebMock.disable_net_connect! -- cgit v1.2.3 From a58ffc4d3e5bb63b7dc6aea93e76be4aa4c4345b Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 May 2016 15:01:41 +0200 Subject: silence all warnings of webmock and evma_httpserver --- test/test_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index c9d8fd4..3222daa 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,9 +1,12 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'rubygems' +require 'kernel_ext' require 'bundler/setup' require 'minitest/autorun' -require 'webmock/minitest' +silence_warnings do + require 'webmock/minitest' +end require 'nickserver' require 'minitest/pride' -- cgit v1.2.3 From 712c1d062c08a58ca8772aafcdc39d0281959b4a Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 May 2016 15:04:36 +0200 Subject: add minitest/hell to the mix This will randomize test order and parallelize them iirc --- test/test_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 3222daa..68e9694 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -9,6 +9,7 @@ silence_warnings do end require 'nickserver' require 'minitest/pride' +require 'minitest/hell' TESTING = true -- cgit v1.2.3 From a89e2ba55399e6bddd9e052cf2064ed0056c958a Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 8 Jun 2016 12:44:38 +0200 Subject: refactor: use new couch_db classes from fetch_key This moves all the em_http related stuff into a single adapter. We're also not using callback and errback inside fetch_key or server for couch requests anymore. Changing the interface for hkp to do the same will follow. --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 68e9694..afdd3f9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -58,7 +58,7 @@ class Minitest::Test Nickserver::Config.stub :couch_host, 'notlocalhost' do options = {status: 200, body: ""}.merge(opts) query = "\?key=#{"%22#{uid}%22"}&reduce=false" - stub_http_request(:get, /#{Regexp.escape(Nickserver::Couch::FetchKey.couch_url)}.*#{query}/).to_return(options) + stub_http_request(:get, /#{Regexp.escape(Nickserver::Config.couch_url)}.*#{query}/).to_return(options) yield end end -- cgit v1.2.3