Account for rpmsave in keep_config test

This commit is contained in:
mpilman 2019-03-02 10:59:24 -08:00 committed by Alex Miller
parent 645eba7b58
commit 66cf5438bd
3 changed files with 16 additions and 4 deletions

View File

@ -119,7 +119,7 @@ then
then
docker_wait_any
fi
echo "Starting Test ${curr_test}"
echo "Starting Test ${curr_name}/${curr_test}"
docker_id=$( docker run -d -v "${fdb_source}:/foundationdb"\
-v "${fdb_build}:/build"\
${curr_name}\

View File

@ -6,6 +6,8 @@ then
source ${source_dir}/modules/util.sh
conf_save_extension=".rpmsave"
install() {
local __res=0
enterfun

View File

@ -102,13 +102,23 @@ then
uninstall
# make sure config didn't get deleted
if [ ! -f /etc/foundationdb/fdb.cluster ] || [ ! -f /etc/foundationdb/foundationdb.conf ]
# RPM, however, renames the file on remove, so we need to check for this
conffile="/etc/foundationdb/foundationdb.conf${conf_save_extension}"
if [ ! -f /etc/foundationdb/fdb.cluster ] || [ ! -f "${conffile}" ]
then
fail "Uninstall removed configuration"
fi
differences="$(diff /tmp/foundationdb.conf ${conffile})"
if [ -n "${differences}" ]
then
fail "${conffile} changed during remove"
fi
differences="$(diff /tmp/fdb.cluster /etc/foundationdb/fdb.cluster)"
if [ -n "${differences}" ]
then
fail "/etc/foundationdb/fdb.cluster changed during remove"
fi
rm /tmp/fdb.cluster
rm /tmp/foundationdb.conf
return 0
}
fi