mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-12 06:30:35 +00:00
Add system's requirements.txt, enforce flake8 linter
Fix style issues in functional tests.
This commit is contained in:
@@ -2,6 +2,10 @@ from lib import BaseTest
|
||||
import re
|
||||
|
||||
|
||||
def sortLines(_, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class PullSnapshot1Test(BaseTest):
|
||||
"""
|
||||
pull snapshot: simple conditions
|
||||
@@ -12,7 +16,7 @@ class PullSnapshot1Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-non-free",
|
||||
]
|
||||
runCmd = "aptly snapshot pull snap1 snap2 snap3 mame unrar"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
@@ -32,7 +36,7 @@ class PullSnapshot2Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot pull snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
@@ -52,7 +56,7 @@ class PullSnapshot3Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot pull -no-deps snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
@@ -72,7 +76,7 @@ class PullSnapshot4Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot pull -dry-run snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
self.check_output()
|
||||
@@ -116,7 +120,7 @@ class PullSnapshot7Test(BaseTest):
|
||||
]
|
||||
runCmd = "aptly snapshot pull snap1 snap2 snap1 'rsyslog (>= 7.4.4)'"
|
||||
expectedCode = 1
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
|
||||
class PullSnapshot8Test(BaseTest):
|
||||
@@ -129,7 +133,7 @@ class PullSnapshot8Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-non-free",
|
||||
]
|
||||
runCmd = "aptly snapshot pull snap1 snap2 snap3 lunar-landing 'mars-landing (>= 1.0)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
@@ -187,7 +191,7 @@ class PullSnapshot11Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot pull -no-remove snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
def check(self):
|
||||
def remove_created_at(s):
|
||||
@@ -243,4 +247,4 @@ class PullSnapshot15Test(BaseTest):
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot pull -dep-verbose-resolve snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
outputMatchPrepare = lambda _, output: "\n".join(sorted(output.split("\n")))
|
||||
outputMatchPrepare = sortLines
|
||||
|
||||
Reference in New Issue
Block a user