summaryrefslogtreecommitdiffstats
path: root/tests/lifecycle.bats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
commit8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /tests/lifecycle.bats
parentNew upstream version 1.11.1+dfsg (diff)
downloadnetdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz
netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/lifecycle.bats')
-rwxr-xr-xtests/lifecycle.bats27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/lifecycle.bats b/tests/lifecycle.bats
new file mode 100755
index 000000000..8efdf4478
--- /dev/null
+++ b/tests/lifecycle.bats
@@ -0,0 +1,27 @@
+#!/usr/bin/env bats
+
+INSTALLATION="$BATS_TMPDIR/installation"
+ENV="${INSTALLATION}/netdata/etc/netdata/.environment"
+
+setup() {
+ if [ ! -f .gitignore ]; 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}"
+}
+
+@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" ]
+}