Skip to content

Commit d221aa0

Browse files
committed
removed hr() calls and switched run_output to run_grep
1 parent 830659e commit d221aa0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test_elasticsearch.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ test_elasticsearch(){
4343
local version="$1"
4444
section2 "Setting up Elasticsearch $version test container"
4545
VERSION="$version" docker-compose up -d
46+
hr
4647
echo "getting Elasticsearch dynamic port mapping:"
4748
docker_compose_port "Elasticsearch"
4849
hr
@@ -55,11 +56,12 @@ test_elasticsearch(){
5556
fi
5657
non_es_node1="127.0.0.1:1025"
5758
non_es_node2="127.0.0.1:1026"
58-
hr
59-
ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT_DEFAULT" run_output "NO_AVAILABLE_SERVER" ./find_active_elasticsearch_node.py $non_es_node1 $non_es_node2
60-
hr
61-
ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT_DEFAULT" run_output "$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT" ./find_active_elasticsearch_node.py $non_es_node1 $non_es_node2 "$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT"
62-
hr
59+
ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT_DEFAULT" \
60+
ERRCODE=1 run_grep "^NO_AVAILABLE_SERVER$" ./find_active_elasticsearch_node.py $non_es_node1 $non_es_node2
61+
62+
ELASTICSEARCH_PORT="$ELASTICSEARCH_PORT_DEFAULT" \
63+
run_grep "^$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT$" ./find_active_elasticsearch_node.py $non_es_node1 $non_es_node2 "$ELASTICSEARCH_HOST:$ELASTICSEARCH_PORT"
64+
6365
docker-compose down
6466
}
6567

0 commit comments

Comments
 (0)