[DRE-commits] [ruby-em-socksify] 02/03: refresh test-localhost.patch and disable tests for squid

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Feb 10 15:25:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository ruby-em-socksify.

commit a4249d479e30a43648e072cb61955878bfec35b4
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Feb 10 20:35:18 2014 +0530

    refresh test-localhost.patch and disable tests for squid
---
 debian/patches/test-localhost.patch | 75 +++++++++++++++++++++++++++++++++++--
 1 file changed, 71 insertions(+), 4 deletions(-)

diff --git a/debian/patches/test-localhost.patch b/debian/patches/test-localhost.patch
index 4c26be3..34a33a9 100644
--- a/debian/patches/test-localhost.patch
+++ b/debian/patches/test-localhost.patch
@@ -1,19 +1,86 @@
 Description: Test HTTP service on localhost
  Debian build process cannot access internet.
  So test HTTP service on localhost instead.
+ .
+ Disable testing squid for now (FIXME).
+ We need a way to run squid during build process.
+ Currently squid exit with core dump.
 Author: Praveen Arimbrathodiyil <praveen at debian.org>
-Last-Update: 2013-06-04
+Last-Update: 2014-02-10
 
 --- a/spec/socksify_spec.rb
 +++ b/spec/socksify_spec.rb
-@@ -8,8 +8,8 @@
+@@ -9,8 +9,8 @@
        include EM::Socksify
  
        def connection_completed
--        socksify('google.ca', 80) do |ip|
--          send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: google.ca\r\n\r\n"
+-        socksify('google.com', 80) do |ip|
+-          send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: google.com\r\n\r\n"
 +        socksify('localhost', 8082) do |ip|
 +          send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: localhost\r\n\r\n"
          end
        end
  
+@@ -32,34 +32,34 @@
+   end
+ 
+   # requires squid running on localhost with default config
+-  it "should negotiate a connect connection" do
++#  it "should negotiate a connect connection" do
++#
++#    class Handler < EM::Connection
++#      include EM::Connectify
++
++#      def connection_completed
++#        connectify('localhost', 8443) do
++#          start_tls
++#          send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: localhost\r\n\r\n"
++#        end
++#      end
++
++#      def receive_data(data)
++#        @received ||= ''
++#        @received << data
++#      end
++
++#      def unbind
++#        @received.size.should > 0
++#        @received[0,4].should == 'HTTP'
++#        EM.stop
++#      end
++#    end
++
++#    EM::run do
++#      EventMachine.connect '127.0.0.1', 3128, Handler
++#    end
+ 
+-    class Handler < EM::Connection
+-      include EM::Connectify
+-
+-      def connection_completed
+-        connectify('www.google.com', 443) do
+-          start_tls
+-          send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: www.google.com\r\n\r\n"
+-        end
+-      end
+-
+-      def receive_data(data)
+-        @received ||= ''
+-        @received << data
+-      end
+-
+-      def unbind
+-        @received.size.should > 0
+-        @received[0,4].should == 'HTTP'
+-        EM.stop
+-      end
+-    end
+-
+-    EM::run do
+-      EventMachine.connect '127.0.0.1', 8081, Handler
+-    end
+-
+-  end
++#  end
+ 
+ end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-em-socksify.git



More information about the Pkg-ruby-extras-commits mailing list