Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 333f0d0

Browse files
author
Chris Wiechmann
committed
Shell script Tests fixed
1 parent c6d02f8 commit 333f0d0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

env-sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,9 @@ ELASTIC_VERSION=7.10.0
389389
# ----------------------------------------------------------------------------------------------
390390
# This is the name how metricbeat reports metric information back to Elasticsearch.
391391
# Used-By: Metricbeat
392-
# Example
393-
# METRICBEAT_NODE_NAME=Logstash-2
392+
# Examples
393+
# METRICBEAT_NODE_NAME=Host-1
394+
# METRICBEAT_NODE_NAME=API-Gateway-1
394395

395396
# ----------------------------------------------------------------------------------------------
396397
# By default Metricbeat will upload all required Dashboards automatically into Kibana. Metricbeat

metricbeat/scripts/metricbeat-entrypoint-test.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ setup() {
4747
unset KIBANA_HOST
4848
run metricbeat/scripts/metricbeat-entrypoint.sh
4949
[ "$status" -eq 0 ]
50-
[ "${lines[2]}" = 'Parameter KIBANA_HOST not given, using first Elasticsearch host' ]
51-
[ "${lines[3]}" = 'KIBANA_HOST set to https://elasticsearch1.host:5601' ]
50+
[ "${lines[2]}" = 'Parameter KIBANA_HOST not given, using https://kibana:5601 as default' ]
51+
[ "${lines[3]}" = 'KIBANA_HOST set to https://kibana:5601' ]
5252
}
5353

5454
@test "invoke metric-entrypoint with valid KIBANA_HOST (simuluated as valid host)" {

metricbeat/scripts/metricbeat-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ elasticHosts=`echo ${ELASTICSEARCH_HOSTS} | awk '
112112
echo "Elasticsearch hosts: ${elasticHosts} will be monitored by Metricbeat"
113113
# Check if Kibana-Host is reachable and if not, disable Kibana-Monitoring
114114
curl -skf ${KIBANA_HOST} || rc=$?
115-
if [ \( "$rc" != "0" -o "$rc" != "" \) ] && [ "${SKIP_VALIDATION}" != true ]; then
115+
if [ \( "$rc" != "0" -a "$rc" != "" \) ] && [ "${SKIP_VALIDATION}" != true ]; then
116116
echo "KIBANA_HOST: ${KIBANA_HOST} is not reachable. Got returncode: ${rc} for command: curl -kv ${KIBANA_HOST}";
117117
echo "Metricbeat Kibana monitoring will be disabled on this host.";
118118
export METRICBEAT_KIBANA_ENABLED=false;

0 commit comments

Comments
 (0)