summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
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");
+