disable test using ruby-tests.rake
This commit is contained in:
parent
86cde05943
commit
7221cddbac
3 changed files with 1 additions and 55 deletions
53
debian/patches/disable-network-tests.patch
vendored
53
debian/patches/disable-network-tests.patch
vendored
|
@ -1,53 +0,0 @@
|
|||
Index: ruby-rack-proxy/test/net_http_hacked_test.rb
|
||||
===================================================================
|
||||
--- ruby-rack-proxy.orig/test/net_http_hacked_test.rb
|
||||
+++ ruby-rack-proxy/test/net_http_hacked_test.rb
|
||||
@@ -3,27 +3,27 @@ require "net_http_hacked"
|
||||
|
||||
class NetHttpHackedTest < Test::Unit::TestCase
|
||||
|
||||
- def test_net_http_hacked
|
||||
- req = Net::HTTP::Get.new("/")
|
||||
- http = Net::HTTP.start("www.iana.org", "80")
|
||||
-
|
||||
- # Response code
|
||||
- res = http.begin_request_hacked(req)
|
||||
- assert res.code == "200"
|
||||
-
|
||||
- # Headers
|
||||
- headers = {}
|
||||
- res.each_header { |k, v| headers[k] = v }
|
||||
-
|
||||
- assert headers.size > 0
|
||||
- assert headers["content-type"] == "text/html; charset=UTF-8"
|
||||
- assert !headers["date"].nil?
|
||||
-
|
||||
- # Body
|
||||
- chunks = []
|
||||
- res.read_body do |chunk|
|
||||
- chunks << chunk
|
||||
- end
|
||||
+# def test_net_http_hacked
|
||||
+# req = Net::HTTP::Get.new("/")
|
||||
+# http = Net::HTTP.start("www.iana.org", "80")
|
||||
+#
|
||||
+# # Response code
|
||||
+# res = http.begin_request_hacked(req)
|
||||
+# assert res.code == "200"
|
||||
+#
|
||||
+# # Headers
|
||||
+# headers = {}
|
||||
+# res.each_header { |k, v| headers[k] = v }
|
||||
+#
|
||||
+# assert headers.size > 0
|
||||
+# assert headers["content-type"] == "text/html; charset=UTF-8"
|
||||
+# assert !headers["date"].nil?
|
||||
+#
|
||||
+# # Body
|
||||
+# chunks = []
|
||||
+# res.read_body do |chunk|
|
||||
+# chunks << chunk
|
||||
+# end
|
||||
|
||||
assert chunks.size > 0
|
||||
chunks.each do |chunk|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -1,2 +1 @@
|
|||
remove-rubygems.patch
|
||||
disable-network-tests.patch
|
||||
|
|
2
debian/ruby-tests.rake
vendored
2
debian/ruby-tests.rake
vendored
|
@ -2,5 +2,5 @@ require 'gem2deb/rake/testtask'
|
|||
|
||||
Gem2Deb::Rake::TestTask.new do |t|
|
||||
t.libs = ['test']
|
||||
t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/test_*.rb']
|
||||
t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/test_*.rb'] - FileList['test/net_http_hacked_test.rb']
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue