Removed additional checks from Elasicsearch Helm test

This test (create and remove test index) already validates that elasticsearch is working correctly. Removed additional check for repo verification for external service like S3 as this seems out of scope since this can be configured differently and causes test to fail.

Change-Id: Ic9328b204c82bdf0e328370d7060a265210c9e8a
This commit is contained in:
aw4825 2021-06-16 10:13:37 -05:00
parent bd17d4b849
commit ff2d317064
3 changed files with 2 additions and 25 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v7.6.2
description: OpenStack-Helm ElasticSearch
name: elasticsearch
version: 0.2.8
version: 0.2.9
home: https://www.elastic.co/
sources:
- https://github.com/elastic/elasticsearch

View File

@ -36,27 +36,6 @@ function create_test_index () {
fi
}
{{ if .Values.conf.elasticsearch.snapshots.enabled }}
function check_snapshot_repositories_verified () {
repositories=$(curl ${CACERT_OPTION} -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
"${ELASTICSEARCH_ENDPOINT}/_snapshot" | jq -r "keys | @sh" )
repositories=$(echo $repositories | sed "s/'//g") # Strip single quotes from jq output
for repository in $repositories; do
error=$(curl ${CACERT_OPTION} -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
-XPOST "${ELASTICSEARCH_ENDPOINT}/_snapshot/${repository}/_verify" | jq -r '.error')
if [ $error == "null" ]; then
echo "PASS: $repository is verified."
else
echo "FAIL: Error for $repository: $(echo $error | jq -r)"
exit 1;
fi
done
}
{{ end }}
function remove_test_index () {
echo "Deleting index created for service testing"
curl ${CACERT_OPTION} -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
@ -66,6 +45,3 @@ function remove_test_index () {
remove_test_index || true
create_test_index
remove_test_index
{{ if .Values.conf.elasticsearch.snapshots.enabled }}
check_snapshot_repositories_verified
{{ end }}

View File

@ -18,4 +18,5 @@ elasticsearch:
- 0.2.6 Enable TLS path between nodes in cluster and TLS path between ceph-rgw
- 0.2.7 Get connection option from values.yaml
- 0.2.8 Use full image ref for docker official images
- 0.2.9 Removed repo verification check from helm-test
...