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
a44d65be
Kaydet (Commit)
a44d65be
authored
Eyl 07, 2016
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Eyl 07, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1187 from bfirsh/fix-broken-mac-address-unit-test
Fix unit test which doesn't do anything
üst
08da5bfd
0cdf7376
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
37 deletions
+10
-37
container_test.py
tests/unit/container_test.py
+10
-6
fake_api.py
tests/unit/fake_api.py
+0
-31
No files found.
tests/unit/container_test.py
Dosyayı görüntüle @
a44d65be
...
...
@@ -751,14 +751,18 @@ class CreateContainerTest(DockerClientTest):
)
def
test_create_container_with_mac_address
(
self
):
mac_address_
expected
=
"02:42:ac:11:00:0a"
expected
=
"02:42:ac:11:00:0a"
container
=
self
.
client
.
create_container
(
'busybox'
,
[
'sleep'
,
'60'
],
mac_address
=
mac_address_expected
)
self
.
client
.
create_container
(
'busybox'
,
[
'sleep'
,
'60'
],
mac_address
=
expected
)
res
=
self
.
client
.
inspect_container
(
container
[
'Id'
])
self
.
assertEqual
(
mac_address_expected
,
res
[
'NetworkSettings'
][
'MacAddress'
])
args
=
fake_request
.
call_args
self
.
assertEqual
(
args
[
0
][
1
],
url_prefix
+
'containers/create'
)
data
=
json
.
loads
(
args
[
1
][
'data'
])
assert
data
[
'MacAddress'
]
==
expected
def
test_create_container_with_links
(
self
):
link_path
=
'path'
...
...
tests/unit/fake_api.py
Dosyayı görüntüle @
a44d65be
...
...
@@ -169,35 +169,6 @@ def get_fake_inspect_image():
return
status_code
,
response
def
get_fake_port
():
status_code
=
200
response
=
{
'HostConfig'
:
{
'Binds'
:
None
,
'ContainerIDFile'
:
''
,
'Links'
:
None
,
'LxcConf'
:
None
,
'PortBindings'
:
{
'1111'
:
None
,
'1111/tcp'
:
[{
'HostIp'
:
'127.0.0.1'
,
'HostPort'
:
'4567'
}],
'2222'
:
None
},
'Privileged'
:
False
,
'PublishAllPorts'
:
False
},
'NetworkSettings'
:
{
'Bridge'
:
'docker0'
,
'PortMapping'
:
None
,
'Ports'
:
{
'1111'
:
None
,
'1111/tcp'
:
[{
'HostIp'
:
'127.0.0.1'
,
'HostPort'
:
'4567'
}],
'2222'
:
None
},
'MacAddress'
:
'02:42:ac:11:00:0a'
}
}
return
status_code
,
response
def
get_fake_insert_image
():
status_code
=
200
response
=
{
'StatusCode'
:
0
}
...
...
@@ -495,8 +466,6 @@ fake_responses = {
post_fake_pause_container
,
'{1}/{0}/containers/3cc2351ab11b/unpause'
.
format
(
CURRENT_VERSION
,
prefix
):
post_fake_unpause_container
,
'{1}/{0}/containers/3cc2351ab11b/json'
.
format
(
CURRENT_VERSION
,
prefix
):
get_fake_port
,
'{1}/{0}/containers/3cc2351ab11b/restart'
.
format
(
CURRENT_VERSION
,
prefix
):
post_fake_restart_container
,
'{1}/{0}/containers/3cc2351ab11b'
.
format
(
CURRENT_VERSION
,
prefix
):
...
...
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