From ff2d31706498d271b138f1e19c25ee717b26e572 Mon Sep 17 00:00:00 2001 From: aw4825 Date: Wed, 16 Jun 2021 10:13:37 -0500 Subject: [PATCH] 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 --- elasticsearch/Chart.yaml | 2 +- .../templates/bin/_helm-tests.sh.tpl | 24 ------------------- releasenotes/notes/elasticsearch.yaml | 1 + 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index c7cac852d..0037e239d 100644 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -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 diff --git a/elasticsearch/templates/bin/_helm-tests.sh.tpl b/elasticsearch/templates/bin/_helm-tests.sh.tpl index 13489d9a7..bf13480cf 100644 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ b/elasticsearch/templates/bin/_helm-tests.sh.tpl @@ -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 }} diff --git a/releasenotes/notes/elasticsearch.yaml b/releasenotes/notes/elasticsearch.yaml index 36812cd2d..3b7306555 100644 --- a/releasenotes/notes/elasticsearch.yaml +++ b/releasenotes/notes/elasticsearch.yaml @@ -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 ...