diff options
Diffstat (limited to 't')
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-1/a.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-1/b.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-1/c.spec | 13 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-2/b.spec | 14 | ||||
-rw-r--r-- | t/data/SPECS/split-transactions--conflict-2/d.spec | 14 | ||||
-rw-r--r-- | t/superuser--split-transactions--conflict.t | 31 |
6 files changed, 100 insertions, 0 deletions
diff --git a/t/data/SPECS/split-transactions--conflict-1/a.spec b/t/data/SPECS/split-transactions--conflict-1/a.spec new file mode 100644 index 00000000..b0345d65 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-1/a.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: b +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-1/b.spec b/t/data/SPECS/split-transactions--conflict-1/b.spec new file mode 100644 index 00000000..b379d4c1 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-1/b.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/split-transactions--conflict-1/c.spec b/t/data/SPECS/split-transactions--conflict-1/c.spec new file mode 100644 index 00000000..21381cf9 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-1/c.spec @@ -0,0 +1,13 @@ +Summary: x +Name: c +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-2/b.spec b/t/data/SPECS/split-transactions--conflict-2/b.spec new file mode 100644 index 00000000..73418c60 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-2/b.spec @@ -0,0 +1,14 @@ +Summary: x +Name: b +Version: 2 +Release: 1 +License: x +Group: x +Url: x +Requires: d +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--conflict-2/d.spec b/t/data/SPECS/split-transactions--conflict-2/d.spec new file mode 100644 index 00000000..663fb2b0 --- /dev/null +++ b/t/data/SPECS/split-transactions--conflict-2/d.spec @@ -0,0 +1,14 @@ +Summary: x +Name: d +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Conflicts: c +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files 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'); +} |