mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Tests for aptly snapshot diff.
This commit is contained in:
7
system/t05_snapshot/DiffSnapshot1Test_gold
Normal file
7
system/t05_snapshot/DiffSnapshot1Test_gold
Normal file
@@ -0,0 +1,7 @@
|
||||
Arch | Package | Version in A | Version in B
|
||||
[0;32;49m+[0;39;49m all | init-system-helpers | - | 1.11~bpo70.1
|
||||
[0m[0;33;49m![0;39;49m amd64 | libestr0 | 0.1.1-2 | 0.1.9-1~bpo70+1
|
||||
[0m[0;33;49m![0;39;49m amd64 | rsyslog | 5.8.11-3 | 7.4.4-1~bpo70+1
|
||||
[0m[0;33;49m![0;39;49m i386 | libestr0 | 0.1.1-2 | 0.1.9-1~bpo70+1
|
||||
[0m[0;33;49m![0;39;49m i386 | rsyslog | 5.8.11-3 | 7.4.4-1~bpo70+1
|
||||
[0m
|
||||
57285
system/t05_snapshot/DiffSnapshot2Test_gold
Normal file
57285
system/t05_snapshot/DiffSnapshot2Test_gold
Normal file
File diff suppressed because it is too large
Load Diff
1692
system/t05_snapshot/DiffSnapshot3Test_gold
Normal file
1692
system/t05_snapshot/DiffSnapshot3Test_gold
Normal file
File diff suppressed because it is too large
Load Diff
1
system/t05_snapshot/DiffSnapshot4Test_gold
Normal file
1
system/t05_snapshot/DiffSnapshot4Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: unable to load snapshot B: snapshot with name snap-no not found
|
||||
1
system/t05_snapshot/DiffSnapshot5Test_gold
Normal file
1
system/t05_snapshot/DiffSnapshot5Test_gold
Normal file
@@ -0,0 +1 @@
|
||||
ERROR: unable to load snapshot A: snapshot with name snap-no not found
|
||||
@@ -7,3 +7,4 @@ from .show import *
|
||||
from .list import *
|
||||
from .verify import *
|
||||
from .pull import *
|
||||
from .diff import *
|
||||
|
||||
62
system/t05_snapshot/diff.py
Normal file
62
system/t05_snapshot/diff.py
Normal file
@@ -0,0 +1,62 @@
|
||||
from lib import BaseTest
|
||||
|
||||
|
||||
class DiffSnapshot1Test(BaseTest):
|
||||
"""
|
||||
diff two snapshots: normal diff
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
"aptly snapshot pull snap1 snap2 snap3 'rsyslog (>= 7.4.4)'"
|
||||
]
|
||||
runCmd = "aptly snapshot diff snap1 snap3"
|
||||
|
||||
|
||||
class DiffSnapshot2Test(BaseTest):
|
||||
"""
|
||||
diff two snapshots: normal diff II
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot diff snap1 snap2"
|
||||
|
||||
|
||||
class DiffSnapshot3Test(BaseTest):
|
||||
"""
|
||||
diff two snapshots: normal diff II + only-matching
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
"aptly snapshot create snap2 from mirror wheezy-backports",
|
||||
]
|
||||
runCmd = "aptly snapshot diff -only-matching snap1 snap2"
|
||||
|
||||
|
||||
class DiffSnapshot4Test(BaseTest):
|
||||
"""
|
||||
diff two snapshots: doesn't exist
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap1 from mirror wheezy-main",
|
||||
]
|
||||
runCmd = "aptly snapshot diff -only-matching snap1 snap-no"
|
||||
expectedCode = 1
|
||||
|
||||
|
||||
class DiffSnapshot5Test(BaseTest):
|
||||
"""
|
||||
diff two snapshots: doesn't exist
|
||||
"""
|
||||
fixtureDB = True
|
||||
fixtureCmds = [
|
||||
"aptly snapshot create snap2 from mirror wheezy-main",
|
||||
]
|
||||
runCmd = "aptly snapshot diff -only-matching snap-no snap2"
|
||||
expectedCode = 1
|
||||
Reference in New Issue
Block a user