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
9b371201
Kaydet (Commit)
9b371201
authored
Agu 27, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #742 from aanand/fix-dockerignore-integration-test
Fix .dockerignore integration test
üst
63df0b9a
ced9b009
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
integration_test.py
tests/integration_test.py
+21
-15
No files found.
tests/integration_test.py
Dosyayı görüntüle @
9b371201
...
...
@@ -1388,35 +1388,41 @@ class TestBuildWithDockerignore(Cleanup, BaseTestCase):
'FROM busybox'
,
'MAINTAINER docker-py'
,
'ADD . /test'
,
'RUN ls -A /test'
,
]))
with
open
(
os
.
path
.
join
(
base_dir
,
'.dockerignore'
),
'w'
)
as
f
:
f
.
write
(
"
\n
"
.
join
([
'
node_modules
'
,
'
ignored
'
,
'Dockerfile'
,
'.docker
gi
nore'
,
'.docker
ig
nore'
,
''
,
# empty line
]))
with
open
(
os
.
path
.
join
(
base_dir
,
'not-ignored'
),
'w'
)
as
f
:
f
.
write
(
"this file should not be ignored"
)
subdir
=
os
.
path
.
join
(
base_dir
,
'
node_modules'
,
'grunt-cli
'
)
subdir
=
os
.
path
.
join
(
base_dir
,
'
ignored'
,
'subdir
'
)
os
.
makedirs
(
subdir
)
with
open
(
os
.
path
.
join
(
subdir
,
'
grunt
'
),
'w'
)
as
f
:
f
.
write
(
"
grunt
"
)
with
open
(
os
.
path
.
join
(
subdir
,
'
file
'
),
'w'
)
as
f
:
f
.
write
(
"
this file should be ignored
"
)
stream
=
self
.
client
.
build
(
path
=
base_dir
,
stream
=
True
)
logs
=
''
tag
=
'docker-py-test-build-with-dockerignore'
stream
=
self
.
client
.
build
(
path
=
base_dir
,
tag
=
tag
,
)
for
chunk
in
stream
:
if
six
.
PY3
:
chunk
=
chunk
.
decode
(
'utf-8'
)
logs
+=
chunk
self
.
assertFalse
(
'node_modules'
in
logs
)
self
.
assertFalse
(
'Dockerfile'
in
logs
)
self
.
assertFalse
(
'.dockerginore'
in
logs
)
self
.
assertTrue
(
'not-ignored'
in
logs
)
pass
c
=
self
.
client
.
create_container
(
tag
,
[
'ls'
,
'-1A'
,
'/test'
])
self
.
client
.
start
(
c
)
self
.
client
.
wait
(
c
)
logs
=
self
.
client
.
logs
(
c
)
self
.
assertEqual
(
filter
(
None
,
logs
.
split
(
'
\n
'
)),
[
'not-ignored'
],
)
#######################
# PY SPECIFIC TESTS #
...
...
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