diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/updater_checks.sh | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/updater_checks.sh b/tests/updater_checks.sh index dce136853f..6d5aeabf31 100755 --- a/tests/updater_checks.sh +++ b/tests/updater_checks.sh @@ -8,9 +8,28 @@ # Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud) # -echo "Installing extra dependencies.." -yum install -y epel-release -yum install -y git bats +echo "Syncing/updating repository.." +running_os="$(cat /etc/os-release |grep '^ID=' | cut -d'=' -f2 | sed -e 's/"//g')" + +case "${running_os}" in +"centos"|"fedora") + echo "Running on CentOS, updating YUM repository.." + yum clean all + yum update -y + + echo "Installing extra dependencies.." + yum install -y epel-release + yum install -y git bats curl + ;; +"debian"|"ubuntu") + echo "Running ${running_os}, updating APT repository" + apt-get update -y + apt-get install -y git bats curl + ;; +*) + echo "Running on ${running_os}, no repository preparation done" + ;; +esac echo "Running BATS file.." bats --tap tests/updater_checks.bats |