TT#72351 Move installed files under ngcp-system-tests instead of ngcp-tests

This makes it more obvious and discoverable what this files are about. We
install compat symlinks so that we do not break external components that
expect these pathnames.

Change-Id: I50643d08d19600767d14fa24e7da9b0f0be7eaef
changes/76/36376/4
Guillem Jover 5 years ago
parent e31d8dd9c8
commit c4a020df3f

@ -1,2 +1,2 @@
templates/* /etc/ngcp-config/templates/etc/ngcp-tests/
testrunner /usr/share/ngcp-tests/
templates/* /etc/ngcp-config/templates/etc/ngcp-system-tests/
testrunner /usr/share/ngcp-system-tests/

@ -0,0 +1,2 @@
/usr/share/ngcp-system-tests /usr/share/ngcp-tests
/etc/ngcp-system-tests /etc/ngcp-tests

@ -30,6 +30,8 @@ set -e
case "$1" in
purge)
rm -rf /etc/ngcp-system-tests/
# Remove old location too.
rm -rf /etc/ngcp-tests/
;;

@ -0,0 +1,25 @@
#!/bin/sh
set -e
case "$1" in
install|upgrade)
# We need to move aside the old generated directory, as the new package
# ships compat symlinks at the same location.
if [ -d /etc/ngcp-tests ]; then
if [ -d /etc/ngcp-system-tests ]; then
rm -rf /etc/ngcp-tests
else
mv /etc/ngcp-tests /etc/ngcp-system-tests
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument '$1'" >&2
exit 1
;;
esac
#DEBHELPER#

@ -34,8 +34,8 @@ else
rm -f "${host_yml_file}"
fi
diag "Rebuilding test configs in /etc/ngcp-test/"
ngcpcfg build /etc/ngcp-test/* 2>&1
diag "Rebuilding test configs in /etc/ngcp-system-tests/"
ngcpcfg build /etc/ngcp-system-tests/* 2>&1
rm -f "${host_yml_file}"
rm -rf "${REPORT_DIRECTORY}"
@ -52,6 +52,6 @@ case "${DEBIAN_RELEASE}" in
DEBIAN_RELEASE=11
;;
esac
DEBIAN_RELEASE=$DEBIAN_RELEASE goss -g "/etc/ngcp-tests/goss.yaml" validate --format tap | tee "${TAP_RESULTS}"
DEBIAN_RELEASE=$DEBIAN_RELEASE goss -g "/etc/ngcp-system-tests/goss.yaml" validate --format tap | tee "${TAP_RESULTS}"
exit "${PIPESTATUS[0]}"

Loading…
Cancel
Save