diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
commit | cd7ed12292aef11d9062b64f61215174e8cc1860 (patch) | |
tree | 9998ab03d153956743d9319cf3a0279b9593ce36 /tests/lifecycle.bats | |
parent | Releasing debian version 1.16.1-6. (diff) | |
download | netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.tar.xz netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.zip |
Merging upstream version 1.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/lifecycle.bats')
-rwxr-xr-x | tests/lifecycle.bats | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/tests/lifecycle.bats b/tests/lifecycle.bats deleted file mode 100755 index 4d18115be..000000000 --- a/tests/lifecycle.bats +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bats -# -# Netdata installation lifecycle testing script. -# This is to validate the install, update and uninstall of netdata -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud) -# - -INSTALLATION="$BATS_TMPDIR/installation" -ENV="${INSTALLATION}/netdata/etc/netdata/.environment" -# list of files which need to be checked. Path cannot start from '/' -FILES="usr/libexec/netdata/plugins.d/go.d.plugin - usr/libexec/netdata/plugins.d/charts.d.plugin - usr/libexec/netdata/plugins.d/python.d.plugin - usr/libexec/netdata/plugins.d/node.d.plugin" - -DIRS="usr/sbin/netdata - etc/netdata - usr/share/netdata - usr/libexec/netdata - var/cache/netdata - var/lib/netdata - var/log/netdata" - -setup() { - # If we are not in netdata git repo, at the top level directory, fail - TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") - CWD=$(git rev-parse --show-cdup || echo "") - if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then - echo "Run as ./tests/lifecycle/$(basename "$0") from top level directory of git repository" - exit 1 - fi -} - -@test "install netdata" { - ./netdata-installer.sh --dont-wait --dont-start-it --auto-update --install "${INSTALLATION}" - - # Validate particular files - for file in $FILES; do - [ ! -f "$BATS_TMPDIR/$file" ] - done - - # Validate particular directories - for a_dir in $DIRS; do - [ ! -d "$BATS_TMPDIR/$a_dir" ] - done -} - -@test "update netdata" { - export ENVIRONMENT_FILE="${ENV}" - /etc/cron.daily/netdata-updater - ! grep "new_installation" "${ENV}" -} - -@test "uninstall netdata" { - ./packaging/installer/netdata-uninstaller.sh --yes --force --env "${ENV}" - [ ! -f "${INSTALLATION}/netdata/usr/sbin/netdata" ] - [ ! -f "/etc/cron.daily/netdata-updater" ] -} |