@@ -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,36 @@ 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' )
1123
+ self .tmp_imgs .append ('hello-world' )
1125
1124
self .assertEqual (type (res ), six .text_type )
1126
1125
self .assertGreaterEqual (
1127
- len (self .client .images ('busybox ' )), 1
1126
+ len (self .client .images ('hello-world ' )), 1
1128
1127
)
1129
- img_info = self .client .inspect_image ('busybox ' )
1128
+ img_info = self .client .inspect_image ('hello-world ' )
1130
1129
self .assertIn ('Id' , img_info )
1131
1130
1132
1131
1133
1132
class TestPullStream (BaseTestCase ):
1134
1133
def runTest (self ):
1135
- self .client .close ()
1136
- self .client = docker_client (timeout = 10 )
1137
1134
try :
1138
- self .client .remove_image ('busybox ' )
1135
+ self .client .remove_image ('hello-world ' )
1139
1136
except docker .errors .APIError :
1140
1137
pass
1141
- stream = self .client .pull ('busybox' , stream = True )
1138
+ stream = self .client .pull ('hello-world' , stream = True )
1139
+ self .tmp_imgs .append ('hello-world' )
1142
1140
for chunk in stream :
1143
1141
if six .PY3 :
1144
1142
chunk = chunk .decode ('utf-8' )
1145
1143
json .loads (chunk ) # ensure chunk is a single, valid JSON blob
1146
1144
self .assertGreaterEqual (
1147
- len (self .client .images ('busybox ' )), 1
1145
+ len (self .client .images ('hello-world ' )), 1
1148
1146
)
1149
- img_info = self .client .inspect_image ('busybox ' )
1147
+ img_info = self .client .inspect_image ('hello-world ' )
1150
1148
self .assertIn ('Id' , img_info )
1151
1149
1152
1150
@@ -1195,9 +1193,7 @@ def runTest(self):
1195
1193
class ImportTestCase (BaseTestCase ):
1196
1194
'''Base class for `docker import` test cases.'''
1197
1195
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
1196
+ TAR_SIZE = 512 * 1024
1201
1197
1202
1198
def write_dummy_tar_content (self , n_bytes , tar_fd ):
1203
1199
def extend_file (f , n_bytes ):
0 commit comments