@@ -82,7 +82,7 @@ def setUp(self):
82
82
if six .PY2 :
83
83
self .assertRegex = self .assertRegexpMatches
84
84
self .assertCountEqual = self .assertItemsEqual
85
- self .client = docker_client (timeout = 5 )
85
+ self .client = docker_client (timeout = 60 )
86
86
self .tmp_imgs = []
87
87
self .tmp_containers = []
88
88
self .tmp_folders = []
@@ -1115,38 +1115,34 @@ def runTest(self):
1115
1115
1116
1116
class TestPull (BaseTestCase ):
1117
1117
def runTest (self ):
1118
- self .client .close ()
1119
- self .client = docker_client (timeout = 10 )
1120
1118
try :
1121
- self .client .remove_image ('busybox ' )
1119
+ self .client .remove_image ('hello-world ' )
1122
1120
except docker .errors .APIError :
1123
1121
pass
1124
- res = self .client .pull ('busybox ' )
1122
+ res = self .client .pull ('hello-world ' )
1125
1123
self .assertEqual (type (res ), six .text_type )
1126
1124
self .assertGreaterEqual (
1127
- len (self .client .images ('busybox ' )), 1
1125
+ len (self .client .images ('hello-world ' )), 1
1128
1126
)
1129
- img_info = self .client .inspect_image ('busybox ' )
1127
+ img_info = self .client .inspect_image ('hello-world ' )
1130
1128
self .assertIn ('Id' , img_info )
1131
1129
1132
1130
1133
1131
class TestPullStream (BaseTestCase ):
1134
1132
def runTest (self ):
1135
- self .client .close ()
1136
- self .client = docker_client (timeout = 10 )
1137
1133
try :
1138
- self .client .remove_image ('busybox ' )
1134
+ self .client .remove_image ('hello-world ' )
1139
1135
except docker .errors .APIError :
1140
1136
pass
1141
- stream = self .client .pull ('busybox ' , stream = True )
1137
+ stream = self .client .pull ('hello-world ' , stream = True )
1142
1138
for chunk in stream :
1143
1139
if six .PY3 :
1144
1140
chunk = chunk .decode ('utf-8' )
1145
1141
json .loads (chunk ) # ensure chunk is a single, valid JSON blob
1146
1142
self .assertGreaterEqual (
1147
- len (self .client .images ('busybox ' )), 1
1143
+ len (self .client .images ('hello-world ' )), 1
1148
1144
)
1149
- img_info = self .client .inspect_image ('busybox ' )
1145
+ img_info = self .client .inspect_image ('hello-world ' )
1150
1146
self .assertIn ('Id' , img_info )
1151
1147
1152
1148
@@ -1195,9 +1191,7 @@ def runTest(self):
1195
1191
class ImportTestCase (BaseTestCase ):
1196
1192
'''Base class for `docker import` test cases.'''
1197
1193
1198
- # Use a large file size to increase the chance of triggering any
1199
- # MemoryError exceptions we might hit.
1200
- TAR_SIZE = 512 * 1024 * 1024
1194
+ TAR_SIZE = 512 * 1024
1201
1195
1202
1196
def write_dummy_tar_content (self , n_bytes , tar_fd ):
1203
1197
def extend_file (f , n_bytes ):
0 commit comments