File: 0001-disable-dns-test.patch

package info (click to toggle)
ruby-cool.io 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 716 kB
  • sloc: ansic: 6,794; ruby: 1,687; makefile: 6
file content (65 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Debian Ruby Extras Maintainers
 <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Date: Thu, 15 Aug 2019 01:39:48 +0900
Subject: disable-dns-test
Forwarded: not-needed
---
 spec/dns_spec.rb | 43 -------------------------------------------
 1 file changed, 43 deletions(-)
 delete mode 100644 spec/dns_spec.rb

Index: ruby-cool.io/spec/dns_spec.rb
===================================================================
--- ruby-cool.io.orig/spec/dns_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require File.expand_path('../spec_helper', __FILE__)
-
-VALID_DOMAIN = "google.com"
-INVALID_DOMAIN = "gibidigibigididibitidibigitibidigitidididi.com"
-
-class ItWorked < StandardError; end
-class WontResolve < StandardError; end
-
-class ConnectorThingy < Cool.io::TCPSocket
-  def on_connect
-    raise ItWorked
-  end
-
-  def on_resolve_failed
-    raise WontResolve
-  end
-end
-
-describe "DNS" do
-  before :each do
-    @loop = Cool.io::Loop.new
-    @preferred_localhost_address = ::Socket.getaddrinfo("localhost", nil).first[3]
-  end
-  
-  it "connects to valid domains" do
-    begin
-      c = ConnectorThingy.connect(VALID_DOMAIN, 80).attach(@loop)
-      
-      expect do
-        @loop.run
-      end.to raise_error(ItWorked)
-    ensure
-      c.close
-    end
-  end
-  
-  it "fires on_resolve_failed for invalid domains" do
-    ConnectorThingy.connect(INVALID_DOMAIN, 80).attach(@loop)
-    
-    expect do
-      @loop.run
-    end.to raise_error(WontResolve)
-  end
-
-  it "resolve localhost even though hosts is empty" do
-    Tempfile.open("empty") do |file|
-      expect( Coolio::DNSResolver.hosts("localhost", file.path)).to eq @preferred_localhost_address
-    end
-  end
-end