]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add testcases for last commit
authorMichael Schroeder <mls@suse.de>
Mon, 3 Jun 2019 13:45:37 +0000 (15:45 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 3 Jun 2019 13:45:37 +0000 (15:45 +0200)
test/testcases/lock/best.t [new file with mode: 0644]
test/testcases/lock/dup.t [new file with mode: 0644]

diff --git a/test/testcases/lock/best.t b/test/testcases/lock/best.t
new file mode 100644 (file)
index 0000000..b7ca17d
--- /dev/null
@@ -0,0 +1,27 @@
+# test that locked packages trump best rules
+
+repo system 0 testtags <inline>
+#>=Pkg: b 1 1 i686
+repo available 0 testtags <inline>
+#>=Pkg: a 2 1 i686
+#>=Pkg: a 3 1 i686
+#>=Pkg: b 2 1 i686
+#>=Pkg: b 3 1 i686
+
+system i686 * system
+
+job install name a [forcebest]
+job lock name a = 3
+result transaction,problems <inline>
+#>install a-2-1.i686@available
+
+nextjob
+job update name b [forcebest]
+job lock name b = 3
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+nextjob
+job update name b [forcebest]
+job lock name b = 1
+result transaction,problems <inline>
diff --git a/test/testcases/lock/dup.t b/test/testcases/lock/dup.t
new file mode 100644 (file)
index 0000000..3b51673
--- /dev/null
@@ -0,0 +1,25 @@
+# test that locked packages trump dup rules
+
+repo system 0 testtags <inline>
+#>=Pkg: a 1 1 i686
+repo available 0 testtags <inline>
+#>=Pkg: a 2 1 i686
+
+system i686 * system
+
+job distupgrade all packages
+job lock name a
+result transaction,problems <inline>
+
+# but we still get a problem if only the available packages
+# are locked
+#
+nextjob
+job distupgrade all packages
+job lock name a = 2
+result transaction,problems <inline>
+#>problem 1889163e info problem with installed package a-1-1.i686
+#>problem 1889163e solution 25ae2253 allow a-1-1.i686@system
+#>problem 1889163e solution d4b95104 deljob lock name a = 2
+#>problem 1889163e solution e5fc66c9 erase a-1-1.i686@system
+#>upgrade a-1-1.i686@system a-2-1.i686@available