summaryrefslogtreecommitdiffstats
path: root/.github/scripts/docker-test.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.github/scripts/docker-test.sh (renamed from packaging/scripts/test.sh)26
1 files changed, 16 insertions, 10 deletions
diff --git a/packaging/scripts/test.sh b/.github/scripts/docker-test.sh
index c3908262..795711b1 100755
--- a/packaging/scripts/test.sh
+++ b/.github/scripts/docker-test.sh
@@ -1,10 +1,6 @@
#!/bin/sh
-dump_log() {
- cat ./netdata.log
-}
-
-trap dump_log EXIT
+export DEBIAN_FRONTEND=noninteractive
wait_for() {
host="${1}"
@@ -37,7 +33,21 @@ wait_for() {
printf "OK\n"
}
-/usr/sbin/netdata -D > ./netdata.log 2>&1 &
+apt-get update && apt-get upgrade -y && apt get install -y netcat
+
+docker run -d --name=netdata \
+ -p 19999:19999 \
+ -v netdataconfig:/etc/netdata \
+ -v netdatalib:/var/lib/netdata \
+ -v netdatacache:/var/cache/netdata \
+ -v /etc/passwd:/host/etc/passwd:ro \
+ -v /etc/group:/host/etc/group:ro \
+ -v /proc:/host/proc:ro \
+ -v /sys:/host/sys:ro \
+ -v /etc/os-release:/host/etc/os-release:ro \
+ --cap-add SYS_PTRACE \
+ --security-opt apparmor=unconfined \
+ netdata/netdata:test
wait_for localhost 19999 netdata || exit 1
@@ -46,7 +56,3 @@ curl -sS http://127.0.0.1:19999/api/v1/info > ./response || exit 1
cat ./response
jq '.version' ./response || exit 1
-
-trap - EXIT
-
-cp -a /packages/* /artifacts