Files
aptly/system/t05_snapshot/show.py
T
Andrey Smirnov c798db8056 Add system's requirements.txt, enforce flake8 linter
Fix style issues in functional tests.
2017-04-28 00:05:11 +03:00

36 lines
886 B
Python

from lib import BaseTest
import re
class ShowSnapshot1Test(BaseTest):
"""
show snapshot: from mirror
"""
fixtureDB = True
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
runCmd = "aptly snapshot show --with-packages snap1"
def outputMatchPrepare(_, s):
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)
class ShowSnapshot2Test(BaseTest):
"""
show snapshot: no snapshot
"""
fixtureDB = True
runCmd = "aptly snapshot show no-such-snapshot"
expectedCode = 1
class ShowSnapshot3Test(BaseTest):
"""
show snapshot: from mirror w/o packages
"""
fixtureDB = True
fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-non-free"]
runCmd = "aptly snapshot show snap1"
def outputMatchPrepare(_, s):
return re.sub(r"Created At: [0-9:A-Za-z -]+\n", "", s)