File: 0001-tests-Don-t-use-proxy-when-testing-connection-to-1.patch

package info (click to toggle)
pycurl 7.45.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,712 kB
  • sloc: python: 8,560; ansic: 6,783; makefile: 209; sh: 196
file content (30 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download | duplicates (4)
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
From 4f5d7ccc6a082dbc3ce0b87b3c34fb9ec98f4301 Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Tue, 12 Jan 2021 17:35:17 +0100
Subject: [PATCH] tests: Don't use proxy when testing connection to ::1
Forwarded: https://github.com/pycurl/pycurl/pull/668

The environment where the test is run may not disable proxy for ::1,
which is the case in Ubuntu CI due to older releases not handling ::1
in no_proxy properly.

https://bugs.launchpad.net/ubuntu/+source/curl/+bug/1908136
---
 tests/open_socket_cb_test.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/open_socket_cb_test.py b/tests/open_socket_cb_test.py
index b2ddbeb..a9a9d70 100644
--- a/tests/open_socket_cb_test.py
+++ b/tests/open_socket_cb_test.py
@@ -77,6 +77,7 @@ class OpenSocketCbTest(unittest.TestCase):
     def test_socket_open_ipv6(self):
         self.curl.setopt(pycurl.OPENSOCKETFUNCTION, socket_open_ipv6)
         self.curl.setopt(self.curl.URL, 'http://[::1]:8380/success')
+        self.curl.setopt(self.curl.NOPROXY, '::1')
         sio = util.BytesIO()
         self.curl.setopt(pycurl.WRITEFUNCTION, sio.write)
         try:
-- 
2.25.1