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
303b3038
Kaydet (Commit)
303b3038
authored
Agu 31, 2017
tarafından
Joffrey F
Kaydeden (comit)
Joffrey F
Kas 07, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use unambiguous advertise-addr when initializing a swarm
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
f470955a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
Makefile
Makefile
+2
-2
api_network_test.py
tests/integration/api_network_test.py
+2
-2
base.py
tests/integration/base.py
+1
-1
models_nodes_test.py
tests/integration/models_nodes_test.py
+1
-1
models_services_test.py
tests/integration/models_services_test.py
+1
-1
models_swarm_test.py
tests/integration/models_swarm_test.py
+1
-1
No files found.
Makefile
Dosyayı görüntüle @
303b3038
...
@@ -47,7 +47,7 @@ TEST_ENGINE_VERSION ?= 17.06.0-ce
...
@@ -47,7 +47,7 @@ TEST_ENGINE_VERSION ?= 17.06.0-ce
.PHONY
:
integration-dind
.PHONY
:
integration-dind
integration-dind
:
build build-py3
integration-dind
:
build build-py3
docker
rm
-vf
dpy-dind
||
:
docker
rm
-vf
dpy-dind
||
:
docker run
-d
--name
dpy-dind
--privileged
dockerswarm/dind:
${
TEST_ENGINE_VERSION
}
docker
daemon
\
docker run
-d
--name
dpy-dind
--privileged
dockerswarm/dind:
${
TEST_ENGINE_VERSION
}
docker
d
\
-H
tcp://0.0.0.0:2375
--experimental
-H
tcp://0.0.0.0:2375
--experimental
docker run
--rm
--env
=
"DOCKER_HOST=tcp://docker:2375"
--env
=
"DOCKER_TEST_API_VERSION=
${
TEST_API_VERSION
}
"
\
docker run
--rm
--env
=
"DOCKER_HOST=tcp://docker:2375"
--env
=
"DOCKER_TEST_API_VERSION=
${
TEST_API_VERSION
}
"
\
--link
=
dpy-dind:docker docker-sdk-python py.test tests/integration
--link
=
dpy-dind:docker docker-sdk-python py.test tests/integration
...
@@ -60,7 +60,7 @@ integration-dind-ssl: build-dind-certs build build-py3
...
@@ -60,7 +60,7 @@ integration-dind-ssl: build-dind-certs build build-py3
docker run
-d
--name
dpy-dind-certs dpy-dind-certs
docker run
-d
--name
dpy-dind-certs dpy-dind-certs
docker run
-d
--env
=
"DOCKER_HOST=tcp://localhost:2375"
--env
=
"DOCKER_TLS_VERIFY=1"
\
docker run
-d
--env
=
"DOCKER_HOST=tcp://localhost:2375"
--env
=
"DOCKER_TLS_VERIFY=1"
\
--env
=
"DOCKER_CERT_PATH=/certs"
--volumes-from
dpy-dind-certs
--name
dpy-dind-ssl
\
--env
=
"DOCKER_CERT_PATH=/certs"
--volumes-from
dpy-dind-certs
--name
dpy-dind-ssl
\
-v
/tmp
--privileged
dockerswarm/dind:
${
TEST_ENGINE_VERSION
}
docker
daemon
--tlsverify
\
-v
/tmp
--privileged
dockerswarm/dind:
${
TEST_ENGINE_VERSION
}
docker
d
--tlsverify
\
--tlscacert
=
/certs/ca.pem
--tlscert
=
/certs/server-cert.pem
\
--tlscacert
=
/certs/ca.pem
--tlscert
=
/certs/server-cert.pem
\
--tlskey
=
/certs/server-key.pem
-H
tcp://0.0.0.0:2375
--experimental
--tlskey
=
/certs/server-key.pem
-H
tcp://0.0.0.0:2375
--experimental
docker run
--rm
--volumes-from
dpy-dind-ssl
--env
=
"DOCKER_HOST=tcp://docker:2375"
\
docker run
--rm
--volumes-from
dpy-dind-ssl
--env
=
"DOCKER_HOST=tcp://docker:2375"
\
...
...
tests/integration/api_network_test.py
Dosyayı görüntüle @
303b3038
...
@@ -447,14 +447,14 @@ class TestNetworks(BaseAPIIntegrationTest):
...
@@ -447,14 +447,14 @@ class TestNetworks(BaseAPIIntegrationTest):
@requires_api_version
(
'1.25'
)
@requires_api_version
(
'1.25'
)
def
test_create_network_attachable
(
self
):
def
test_create_network_attachable
(
self
):
assert
self
.
client
.
init_swarm
(
'eth0'
)
assert
self
.
init_swarm
(
)
_
,
net_id
=
self
.
create_network
(
driver
=
'overlay'
,
attachable
=
True
)
_
,
net_id
=
self
.
create_network
(
driver
=
'overlay'
,
attachable
=
True
)
net
=
self
.
client
.
inspect_network
(
net_id
)
net
=
self
.
client
.
inspect_network
(
net_id
)
assert
net
[
'Attachable'
]
is
True
assert
net
[
'Attachable'
]
is
True
@requires_api_version
(
'1.29'
)
@requires_api_version
(
'1.29'
)
def
test_create_network_ingress
(
self
):
def
test_create_network_ingress
(
self
):
assert
self
.
client
.
init_swarm
(
'eth0'
)
assert
self
.
init_swarm
(
)
self
.
client
.
remove_network
(
'ingress'
)
self
.
client
.
remove_network
(
'ingress'
)
_
,
net_id
=
self
.
create_network
(
driver
=
'overlay'
,
ingress
=
True
)
_
,
net_id
=
self
.
create_network
(
driver
=
'overlay'
,
ingress
=
True
)
net
=
self
.
client
.
inspect_network
(
net_id
)
net
=
self
.
client
.
inspect_network
(
net_id
)
...
...
tests/integration/base.py
Dosyayı görüntüle @
303b3038
...
@@ -110,5 +110,5 @@ class BaseAPIIntegrationTest(BaseIntegrationTest):
...
@@ -110,5 +110,5 @@ class BaseAPIIntegrationTest(BaseIntegrationTest):
def
init_swarm
(
self
,
**
kwargs
):
def
init_swarm
(
self
,
**
kwargs
):
return
self
.
client
.
init_swarm
(
return
self
.
client
.
init_swarm
(
'
eth0
'
,
listen_addr
=
helpers
.
swarm_listen_addr
(),
**
kwargs
'
127.0.0.1
'
,
listen_addr
=
helpers
.
swarm_listen_addr
(),
**
kwargs
)
)
tests/integration/models_nodes_test.py
Dosyayı görüntüle @
303b3038
...
@@ -15,7 +15,7 @@ class NodesTest(unittest.TestCase):
...
@@ -15,7 +15,7 @@ class NodesTest(unittest.TestCase):
def
test_list_get_update
(
self
):
def
test_list_get_update
(
self
):
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
.
swarm
.
init
(
'
eth0
'
,
listen_addr
=
helpers
.
swarm_listen_addr
())
client
.
swarm
.
init
(
'
127.0.0.1
'
,
listen_addr
=
helpers
.
swarm_listen_addr
())
nodes
=
client
.
nodes
.
list
()
nodes
=
client
.
nodes
.
list
()
assert
len
(
nodes
)
==
1
assert
len
(
nodes
)
==
1
assert
nodes
[
0
]
.
attrs
[
'Spec'
][
'Role'
]
==
'manager'
assert
nodes
[
0
]
.
attrs
[
'Spec'
][
'Role'
]
==
'manager'
...
...
tests/integration/models_services_test.py
Dosyayı görüntüle @
303b3038
...
@@ -12,7 +12,7 @@ class ServiceTest(unittest.TestCase):
...
@@ -12,7 +12,7 @@ class ServiceTest(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
helpers
.
force_leave_swarm
(
client
)
helpers
.
force_leave_swarm
(
client
)
client
.
swarm
.
init
(
'
eth0
'
,
listen_addr
=
helpers
.
swarm_listen_addr
())
client
.
swarm
.
init
(
'
127.0.0.1
'
,
listen_addr
=
helpers
.
swarm_listen_addr
())
@classmethod
@classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
...
...
tests/integration/models_swarm_test.py
Dosyayı görüntüle @
303b3038
...
@@ -16,7 +16,7 @@ class SwarmTest(unittest.TestCase):
...
@@ -16,7 +16,7 @@ class SwarmTest(unittest.TestCase):
def
test_init_update_leave
(
self
):
def
test_init_update_leave
(
self
):
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
=
docker
.
from_env
(
version
=
TEST_API_VERSION
)
client
.
swarm
.
init
(
client
.
swarm
.
init
(
advertise_addr
=
'
eth0
'
,
snapshot_interval
=
5000
,
advertise_addr
=
'
127.0.0.1
'
,
snapshot_interval
=
5000
,
listen_addr
=
helpers
.
swarm_listen_addr
()
listen_addr
=
helpers
.
swarm_listen_addr
()
)
)
assert
client
.
swarm
.
attrs
[
'Spec'
][
'Raft'
][
'SnapshotInterval'
]
==
5000
assert
client
.
swarm
.
attrs
[
'Spec'
][
'Raft'
][
'SnapshotInterval'
]
==
5000
...
...
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