summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2009-08-05 21:23:05 +0000
committerAnssi Hannula <anssi@mandriva.org>2009-08-05 21:23:05 +0000
commitc045d29f13a8dccc7be229cd6e68f721d2c00c1a (patch)
treefafc390cce56cd0a3aed2eb858e48948558362e1 /t
parent47ea9764f70de9682fa0b38329dd56d21d984381 (diff)
downloadurpmi-c045d29f13a8dccc7be229cd6e68f721d2c00c1a.tar
urpmi-c045d29f13a8dccc7be229cd6e68f721d2c00c1a.tar.gz
urpmi-c045d29f13a8dccc7be229cd6e68f721d2c00c1a.tar.bz2
urpmi-c045d29f13a8dccc7be229cd6e68f721d2c00c1a.tar.xz
urpmi-c045d29f13a8dccc7be229cd6e68f721d2c00c1a.zip
Add urpmi testcase for bug #52667. (disabled until fixed)
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/split-transactions--promote-1/l.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-1/m.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-1/n.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-2/l.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-2/m.spec13
-rw-r--r--t/superuser--split-transactions--promote.t22
6 files changed, 91 insertions, 0 deletions
diff --git a/t/data/SPECS/split-transactions--promote-1/l.spec b/t/data/SPECS/split-transactions--promote-1/l.spec
new file mode 100644
index 00000000..73ce8e20
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/l.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: l
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/m.spec b/t/data/SPECS/split-transactions--promote-1/m.spec
new file mode 100644
index 00000000..d2771e6f
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/m.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: m
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/n.spec b/t/data/SPECS/split-transactions--promote-1/n.spec
new file mode 100644
index 00000000..70266840
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/n.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: n
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: m
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/l.spec b/t/data/SPECS/split-transactions--promote-2/l.spec
new file mode 100644
index 00000000..051e1d6f
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/l.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: l
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/m.spec b/t/data/SPECS/split-transactions--promote-2/m.spec
new file mode 100644
index 00000000..63511663
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/m.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: m
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--split-transactions--promote.t b/t/superuser--split-transactions--promote.t
index 2fc80958..f5ff2dcd 100644
--- a/t/superuser--split-transactions--promote.t
+++ b/t/superuser--split-transactions--promote.t
@@ -16,6 +16,10 @@
# j2 provides j
# k1-1 provides k, but not k1-2
#
+# l-1 and l-2 requires k
+# m-1 requires k but not m-2
+# n requires m
+#
use strict;
use lib '.', 't';
use helper;
@@ -51,6 +55,11 @@ sub test {
#- below need the promotion of "j2" (replacing removed j1) to work
test_ijk("$split k1");
+
+ #- below tests for bug #52667
+ #- transactions created with only k1 upgrade caused n to be removed
+ #test_klm("$split --auto-select");
+ #test_klm("$split k1");
}
sub test_conflict {
test_conflict_ef();
@@ -107,6 +116,19 @@ sub test_ijk {
check_installed_fullnames_and_remove('i-1-1', 'j2-1-1', 'k1-2-1');
}
+sub test_klm {
+ my ($para) = @_;
+ urpmi("--media $name-1 --auto l");
+ urpmi("--media $name-1 --auto n"); # separated in order to force install order
+ check_installed_names('k1', 'l', 'm', 'n');
+
+ my $output = run_urpm_cmd("urpmi --media $name-2 --auto $para 2>&1");
+ ok($output !~ /transaction is too small/, "test_klm transaction validity");
+ ok($output !~ /due to missing m/, "do not ask for removal of n"); # false message
+ # installation was always ok, just transactions and messages above were wrong
+ check_installed_fullnames_and_remove('k1-2-1', 'm-2-1', 'n-1-1');
+}
+
sub test_conflict_ef {
my ($para) = @_;