New config setting: downloadSpeedLimit to limit download speed. #62

This commit is contained in:
Andrey Smirnov
2014-07-13 15:47:23 +04:00
parent fb1e28b91b
commit a54a366c95
4 changed files with 22 additions and 3 deletions
+17 -2
View File
@@ -219,11 +219,26 @@ class BaseTest(object):
def check_file_contents(self, path, gold_name, match_prepare=None):
contents = self.read_file(path)
try:
self.verify_match(self.get_gold(gold_name), contents, match_prepare=match_prepare)
self.verify_match(self.get_gold(gold_name), contents, match_prepare=match_prepare)
except:
if self.captureResults:
with open(self.get_gold_filename(gold_name), "w") as f:
f.write(contents)
else:
raise
def check_file(self):
self.verify_match(self.get_gold(), open(self.checkedFile, "r").read())
contents = open(self.checkedFile, "r").read()
try:
self.verify_match(self.get_gold(), contents)
except:
if self.captureResults:
with open(self.get_gold_filename(), "w") as f:
f.write(contents)
else:
raise
def check_exists(self, path):
if not os.path.exists(os.path.join(os.environ["HOME"], ".aptly", path)):
+2 -1
View File
@@ -1,6 +1,7 @@
{
"rootDir": "${HOME}/.aptly",
"rootDir": "/Users/smira/.aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,