summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-03-02 23:26:56 -0500
committerAllan McRae <allan@archlinux.org>2013-06-03 13:33:47 +1000
commit0c41663c7b5a9d73ea49c20b74149d12f0fcd26c (patch)
treede9a9eeb6510be5992a5c8534029b72d8c7922d0 /test
parent9ca423b981c897c7d3894c5b394c23d786e4ba37 (diff)
downloadpacman-0c41663c7b5a9d73ea49c20b74149d12f0fcd26c.tar.xz
update tests for symlink support removal
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/fileconflict007.py1
-rw-r--r--test/pacman/tests/fileconflict013.py7
-rw-r--r--test/pacman/tests/fileconflict022.py1
-rw-r--r--test/pacman/tests/fileconflict023.py9
-rw-r--r--test/pacman/tests/fileconflict025.py10
-rw-r--r--test/pacman/tests/symlink001.py11
-rw-r--r--test/pacman/tests/sync700.py12
-rw-r--r--test/pacman/tests/sync701.py11
-rw-r--r--test/pacman/tests/sync702.py9
9 files changed, 40 insertions, 31 deletions
diff --git a/test/pacman/tests/fileconflict007.py b/test/pacman/tests/fileconflict007.py
index 4ee4624e..7fe65ed4 100644
--- a/test/pacman/tests/fileconflict007.py
+++ b/test/pacman/tests/fileconflict007.py
@@ -15,3 +15,4 @@ self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg")
self.addrule("PKG_VERSION=pkg|1.0-2")
+self.addrule("FILE_TYPE=dir/symdir/|dir")
diff --git a/test/pacman/tests/fileconflict013.py b/test/pacman/tests/fileconflict013.py
index a83923c6..5c3a43b1 100644
--- a/test/pacman/tests/fileconflict013.py
+++ b/test/pacman/tests/fileconflict013.py
@@ -1,4 +1,5 @@
self.description = "file->file path change with same effective path (/lib as symlink)"
+# Note: this situation means the filesystem and local db are out of sync
lp1 = pmpkg("filesystem", "1.0-1")
lp1.files = ["usr/",
@@ -16,5 +17,7 @@ self.addpkg2db("sync", sp1)
self.args = "-Su"
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_VERSION=pkg1|1.0-2")
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PKG_VERSION=pkg1|1.0-1")
+
+self.expectfailure = True
diff --git a/test/pacman/tests/fileconflict022.py b/test/pacman/tests/fileconflict022.py
index 5759d4c3..5ff0b537 100644
--- a/test/pacman/tests/fileconflict022.py
+++ b/test/pacman/tests/fileconflict022.py
@@ -14,6 +14,5 @@ self.addpkg2db("sync", sp2)
self.args = "-S %s %s" % (sp1.name, sp2.name)
self.addrule("PACMAN_RETCODE=1")
-self.addrule("PACMAN_OUTPUT=.*/usr/lib/file exists in both 'foo' and 'bar'")
self.addrule("!PKG_EXIST=foo")
self.addrule("!PKG_EXIST=bar")
diff --git a/test/pacman/tests/fileconflict023.py b/test/pacman/tests/fileconflict023.py
index ce72087b..9685c0dd 100644
--- a/test/pacman/tests/fileconflict023.py
+++ b/test/pacman/tests/fileconflict023.py
@@ -1,4 +1,5 @@
self.description = "File conflict between package with symlink and package with real path resolved by removal"
+# Note: this situation means the filesystem and local db are out of sync
self.filesystem = ["usr/", "usr/lib/", "lib -> usr/lib/"]
@@ -13,6 +14,8 @@ self.addpkg2db("sync", sp1)
self.args = "-S %s --ask=4" % sp1.name
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXIST=foo")
-self.addrule("PKG_EXIST=bar")
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PKG_EXIST=foo")
+self.addrule("!PKG_EXIST=bar")
+
+self.expectfailure = True
diff --git a/test/pacman/tests/fileconflict025.py b/test/pacman/tests/fileconflict025.py
index 3c6f0638..195badbc 100644
--- a/test/pacman/tests/fileconflict025.py
+++ b/test/pacman/tests/fileconflict025.py
@@ -1,4 +1,4 @@
-self.description = "File conflict between package with symlink and package with real path resolved by removal (reversed)"
+self.description = "File conflict between package with symlink and package with real path and filesystem (reversed)"
self.filesystem = ["usr/lib/", "lib -> usr/lib/"]
@@ -13,6 +13,8 @@ self.addpkg2db("sync", sp1)
self.args = "-S %s --ask=4" % sp1.name
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("!PKG_EXIST=foo")
-self.addrule("PKG_EXIST=bar")
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PKG_EXIST=foo")
+self.addrule("!PKG_EXIST=bar")
+
+self.expectfailure = True
diff --git a/test/pacman/tests/symlink001.py b/test/pacman/tests/symlink001.py
index cbf71ccc..f88d0ae7 100644
--- a/test/pacman/tests/symlink001.py
+++ b/test/pacman/tests/symlink001.py
@@ -11,10 +11,11 @@ self.addpkg(p)
self.args = "-U %s" % p.filename()
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("FILE_EXIST=dir/symdir/tmp")
-self.addrule("FILE_EXIST=dir/realdir/tmp")
-self.addrule("FILE_TYPE=dir/symdir/tmp|file")
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!FILE_EXIST=dir/symdir/tmp")
+self.addrule("!FILE_EXIST=dir/realdir/tmp")
self.addrule("FILE_TYPE=dir/symdir|link")
self.addrule("FILE_TYPE=dir/realdir|dir")
+
+self.expectfailure = True
diff --git a/test/pacman/tests/sync700.py b/test/pacman/tests/sync700.py
index 9748c819..3948b006 100644
--- a/test/pacman/tests/sync700.py
+++ b/test/pacman/tests/sync700.py
@@ -1,4 +1,5 @@
-self.description = "do not remove directory symlink if another package has file in its path"
+self.description = "removal of directory symlink when another package has file in its path"
+# Note: this situation means that the filesystem and local db are out of sync
lp1 = pmpkg("pkg1")
lp1.files = ["usr/lib/foo",
@@ -15,8 +16,7 @@ self.addpkg2db("sync", p)
self.args = "-S pkg1"
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("PKG_VERSION=pkg1|1.0-1")
-self.addrule("FILE_EXIST=lib/bar")
-
-self.expectfailure = True
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|1.0-2")
+self.addrule("FILE_EXIST=usr/lib/bar")
+self.addrule("!FILE_EXIST=lib/bar")
diff --git a/test/pacman/tests/sync701.py b/test/pacman/tests/sync701.py
index 201f6028..590845ff 100644
--- a/test/pacman/tests/sync701.py
+++ b/test/pacman/tests/sync701.py
@@ -1,4 +1,4 @@
-self.description = "do not remove directory symlink if incoming package has file in its path (order 1)"
+self.description = "incoming package replaces symlink with directory (order 1)"
lp = pmpkg("pkg1")
lp.files = ["usr/lib/foo",
@@ -15,8 +15,7 @@ self.addpkg2db("sync", p2)
self.args = "-S pkg1 pkg2"
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("PKG_VERSION=pkg1|1.0-1")
-self.addrule("!PKG_EXIST=pkg2")
-
-self.expectfailure = True
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|1.0-2")
+self.addrule("PKG_EXIST=pkg2")
+self.addrule("FILE_TYPE=lib|dir")
diff --git a/test/pacman/tests/sync702.py b/test/pacman/tests/sync702.py
index ee4eef95..8f4c0ad7 100644
--- a/test/pacman/tests/sync702.py
+++ b/test/pacman/tests/sync702.py
@@ -1,4 +1,4 @@
-self.description = "do not remove directory symlink if incoming package has file in its path (order 2)"
+self.description = "incoming package replaces symlink with directory (order 2)"
lp = pmpkg("pkg2")
lp.files = ["usr/lib/foo",
@@ -15,8 +15,9 @@ self.addpkg2db("sync", p2)
self.args = "-S pkg1 pkg2"
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("PKG_VERSION=pkg2|1.0-1")
-self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg2|1.0-2")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("FILE_TYPE=lib|dir")
self.expectfailure = True