Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
ffdc0487
Kaydet (Commit)
ffdc0487
authored
Mar 15, 2018
tarafından
Joffrey F
Kaydeden (comit)
Joffrey F
Mar 20, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix socket tests for TLS-enabled tests
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
cf1d8691
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
helpers.py
tests/helpers.py
+5
-5
No files found.
tests/helpers.py
Dosyayı görüntüle @
ffdc0487
...
@@ -108,21 +108,21 @@ def swarm_listen_addr():
...
@@ -108,21 +108,21 @@ def swarm_listen_addr():
def
assert_cat_socket_detached_with_keys
(
sock
,
inputs
):
def
assert_cat_socket_detached_with_keys
(
sock
,
inputs
):
if
six
.
PY3
:
if
six
.
PY3
and
hasattr
(
sock
,
'_sock'
)
:
sock
=
sock
.
_sock
sock
=
sock
.
_sock
for
i
in
inputs
:
for
i
in
inputs
:
sock
.
send
(
i
)
sock
.
send
all
(
i
)
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
# If we're using a Unix socket, the sock.send call will fail with a
# If we're using a Unix socket, the sock.send call will fail with a
# BrokenPipeError ; INET sockets will just stop receiving / sending data
# BrokenPipeError ; INET sockets will just stop receiving / sending data
# but will not raise an error
# but will not raise an error
if
sock
.
family
==
getattr
(
socket
,
'AF_UNIX'
,
-
1
):
if
getattr
(
sock
,
'family'
,
-
9
)
==
getattr
(
socket
,
'AF_UNIX'
,
-
1
):
with
pytest
.
raises
(
socket
.
error
):
with
pytest
.
raises
(
socket
.
error
):
sock
.
send
(
b
'make sure the socket is closed
\n
'
)
sock
.
send
all
(
b
'make sure the socket is closed
\n
'
)
else
:
else
:
sock
.
send
(
b
"make sure the socket is closed
\n
"
)
sock
.
send
all
(
b
"make sure the socket is closed
\n
"
)
assert
sock
.
recv
(
32
)
==
b
''
assert
sock
.
recv
(
32
)
==
b
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment