add "forcebest" testcases
authorMichael Schroeder <mls@suse.de>
Mon, 3 Dec 2012 15:06:22 +0000 (16:06 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 3 Dec 2012 15:06:22 +0000 (16:06 +0100)
test/testcases/forcebest/forcebest_dup.t [new file with mode: 0644]
test/testcases/forcebest/forcebest_in.t [new file with mode: 0644]
test/testcases/forcebest/forcebest_up.t [new file with mode: 0644]

diff --git a/test/testcases/forcebest/forcebest_dup.t b/test/testcases/forcebest/forcebest_dup.t
new file mode 100644 (file)
index 0000000..8de43eb
--- /dev/null
@@ -0,0 +1,45 @@
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>A = 1-1
+#>-Prv:
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>D = 1-1
+#>-Prv:
+#>+Con:
+#>A = 3-1
+#>-Con:
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>A = 2-1
+#>-Prv:
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+#>+Prv:
+#>A = 3-1
+#>-Prv:
+system i686 rpm system
+
+job distupgrade name A [forcebest]
+result transaction,problems <inline>
+#>erase D-1-1.noarch@system
+#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch
+#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system
+#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available
+#>upgrade A-1-1.noarch@system A-3-1.noarch@available
+
+# test if bestobeypolicy is a noop for dup jobs
+nextjob
+solverflags bestobeypolicy
+job distupgrade name A [forcebest]
+result transaction,problems <inline>
+#>erase D-1-1.noarch@system
+#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch
+#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system
+#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available
+#>upgrade A-1-1.noarch@system A-3-1.noarch@available
diff --git a/test/testcases/forcebest/forcebest_in.t b/test/testcases/forcebest/forcebest_in.t
new file mode 100644 (file)
index 0000000..976ceda
--- /dev/null
@@ -0,0 +1,40 @@
+repo system 0 testtags <inline>
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>D = 1-1
+#>-Prv:
+#>+Con:
+#>A = 3-1
+#>-Con:
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>A = 2-1
+#>-Prv:
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+#>+Prv:
+#>A = 3-1
+#>-Prv:
+system i686 rpm system
+
+job install name A [forcebest]
+result transaction,problems <inline>
+#>erase D-1-1.noarch@system
+#>install A-3-1.noarch@available
+#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch
+#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system
+#>problem 1210fdfb solution d85f7c4e deljob install name A [forcebest]
+
+# currently bestobeypolicy is a noop for install jobs
+nextjob
+solverflags bestobeypolicy
+job install name A [forcebest]
+result transaction,problems <inline>
+#>erase D-1-1.noarch@system
+#>install A-3-1.noarch@available
+#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch
+#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system
+#>problem 1210fdfb solution d85f7c4e deljob install name A [forcebest]
diff --git a/test/testcases/forcebest/forcebest_up.t b/test/testcases/forcebest/forcebest_up.t
new file mode 100644 (file)
index 0000000..74c01b0
--- /dev/null
@@ -0,0 +1,40 @@
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>A = 1-1
+#>-Prv:
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>D = 1-1
+#>-Prv:
+#>+Con:
+#>A = 3-1
+#>-Con:
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>+Prv:
+#>A = 2-1
+#>-Prv:
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+#>+Prv:
+#>A = 3-1
+#>-Prv:
+system i686 rpm system
+
+job update name A [forcebest]
+result transaction,problems <inline>
+#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch
+#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system
+#>problem 1210fdfb solution 0d75a914 replace A-1-1.noarch@system A-3-1.noarch@available
+#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available
+
+nextjob
+solverflags bestobeypolicy
+job update name A [forcebest]
+result transaction,problems <inline>
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available