summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-10-20 20:49:08 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-10-20 21:15:35 +0200
commitcdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80 (patch)
tree353acccb2945337b63df8f5c39f0c610a1628aa7 /t
parentd4fc598815436bf2a1cc60411e0a4e80763498db (diff)
downloadurpmi-cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80.tar
urpmi-cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80.tar.gz
urpmi-cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80.tar.bz2
urpmi-cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80.tar.xz
urpmi-cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80.zip
adapt testsuite to rpm-4.13.0~rc2
...which fixed %preun not aborting package erasure
Diffstat (limited to 't')
-rw-r--r--t/superuser--failing-scriptlets.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/superuser--failing-scriptlets.t b/t/superuser--failing-scriptlets.t
index 1f0f733f..80c81146 100644
--- a/t/superuser--failing-scriptlets.t
+++ b/t/superuser--failing-scriptlets.t
@@ -12,7 +12,7 @@ need_root_and_prepare();
test_install_rpm_fail('pre');
test_install_rpm_fail('pretrans');
test_install_rpm('post');
-test_install_rpm('preun');
+test_install_rpm_but_uninstall_fail('preun');
test_install_rpm('postun');
test_install_rpm('posttrans');
@@ -39,6 +39,16 @@ sub test_install_rpm_fail {
check_installed_fullnames_and_remove("sh-1-1");
}
+sub test_install_rpm_but_uninstall_fail {
+ my ($name) = @_;
+ test_install_rpm_no_remove('sh');
+ system_("rpm --root $::pwd/root -i media/$medium_name/$name-*.rpm");
+ check_installed_fullnames("$name-1-1", "sh-1-1");
+ system_should_fail("rpm --root $::pwd/root -e $name");
+ system_("rpm --root $::pwd/root -e $name --nopreun");
+ check_installed_fullnames_and_remove("sh-1-1");
+}
+
sub test_install_upgrade_rpm {
my ($name) = @_;