summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2009-07-06 22:34:44 +0000
committerAnssi Hannula <anssi@mandriva.org>2009-07-06 22:34:44 +0000
commit1b7039f177bc44038fcd2f21b506c7ee36e289b2 (patch)
tree53d5aaf2b361c48d9da166a83a5d020d3d65c4ec /t
parente739be7634be4ee51eb4181659b49ffc729fa28f (diff)
downloadurpmi-1b7039f177bc44038fcd2f21b506c7ee36e289b2.tar
urpmi-1b7039f177bc44038fcd2f21b506c7ee36e289b2.tar.gz
urpmi-1b7039f177bc44038fcd2f21b506c7ee36e289b2.tar.bz2
urpmi-1b7039f177bc44038fcd2f21b506c7ee36e289b2.tar.xz
urpmi-1b7039f177bc44038fcd2f21b506c7ee36e289b2.zip
Add testcase for bug #50666 (failing-promotion)
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/failing-promotion/a-1.spec13
-rw-r--r--t/data/SPECS/failing-promotion/a-2.spec13
-rw-r--r--t/data/SPECS/failing-promotion/b-1.spec14
-rw-r--r--t/data/SPECS/failing-promotion/b-2.spec14
-rw-r--r--t/data/SPECS/failing-promotion/c-1.spec14
-rw-r--r--t/data/SPECS/failing-promotion/c-2.spec14
-rw-r--r--t/superuser--failing-promotion.t29
7 files changed, 111 insertions, 0 deletions
diff --git a/t/data/SPECS/failing-promotion/a-1.spec b/t/data/SPECS/failing-promotion/a-1.spec
new file mode 100644
index 00000000..f75c94d2
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/a-1.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: a
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/failing-promotion/a-2.spec b/t/data/SPECS/failing-promotion/a-2.spec
new file mode 100644
index 00000000..0cd2afc8
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/a-2.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: a
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/failing-promotion/b-1.spec b/t/data/SPECS/failing-promotion/b-1.spec
new file mode 100644
index 00000000..b379d4c1
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/b-1.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: b
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: c
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/failing-promotion/b-2.spec b/t/data/SPECS/failing-promotion/b-2.spec
new file mode 100644
index 00000000..2095eeb1
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/b-2.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: b
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: c
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/failing-promotion/c-1.spec b/t/data/SPECS/failing-promotion/c-1.spec
new file mode 100644
index 00000000..08794647
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/c-1.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: c
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: a = 1
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/failing-promotion/c-2.spec b/t/data/SPECS/failing-promotion/c-2.spec
new file mode 100644
index 00000000..614e84e3
--- /dev/null
+++ b/t/data/SPECS/failing-promotion/c-2.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: c
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: d
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--failing-promotion.t b/t/superuser--failing-promotion.t
new file mode 100644
index 00000000..055cbcde
--- /dev/null
+++ b/t/superuser--failing-promotion.t
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+#
+# testcase for bug #50666
+#
+# b-1 requires c
+# b-2 requires c
+# c-1 requires a-1
+# c-2 requires d
+# d does not exist
+#
+# user has a-1, b-1, c-1 installed
+# trying to upgrade a has to remove b, c
+#
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'failing-promotion';
+urpmi_addmedia("$name $::pwd/media/$name");
+
+urpmi("--auto a-1 c-1 b-1");
+check_installed_fullnames("a-1-1", "c-1-1", "b-1-1");
+urpmi("--auto a");
+check_installed_fullnames("a-2-1");
+