summaryrefslogtreecommitdiffstats
path: root/t/superuser--split-transactions--conflict.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-05 15:07:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-05 15:07:24 +0000
commit8b8da702258d90b067910f4dfbf21028b1b02608 (patch)
treeea0c9e06fd95be97f452730a7b363511822583ea /t/superuser--split-transactions--conflict.t
parentde58653813d013143bdac6398b90c01b330369b8 (diff)
downloadurpmi-8b8da702258d90b067910f4dfbf21028b1b02608.tar
urpmi-8b8da702258d90b067910f4dfbf21028b1b02608.tar.gz
urpmi-8b8da702258d90b067910f4dfbf21028b1b02608.tar.bz2
urpmi-8b8da702258d90b067910f4dfbf21028b1b02608.tar.xz
urpmi-8b8da702258d90b067910f4dfbf21028b1b02608.zip
add a test case which triggers "transaction is too small" error
(nb: it's not a fatal error since "one big transaction" fallback is used)
Diffstat (limited to 't/superuser--split-transactions--conflict.t')
-rw-r--r--t/superuser--split-transactions--conflict.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/superuser--split-transactions--conflict.t b/t/superuser--split-transactions--conflict.t
new file mode 100644
index 00000000..ec88b664
--- /dev/null
+++ b/t/superuser--split-transactions--conflict.t
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+# a requires b
+# b-1 requires c
+# b-2 requires d
+# d conflicts with c
+#
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'split-transactions--conflict';
+urpmi_addmedia("$name-1 $::pwd/media/$name-1");
+urpmi_addmedia("$name-2 $::pwd/media/$name-2");
+
+test('--split-length 0');
+test('--split-level 1');
+
+sub test {
+ my ($option) = @_;
+
+ urpmi("--media $name-1 --auto a b c");
+ check_installed_fullnames('a-1-1', 'b-1-1', 'c-1-1');
+
+ urpmi("--media $name-2 $option --auto --auto-select");
+ check_installed_fullnames_and_remove('a-1-1', 'b-2-1', 'd-1-1');
+}