From ed8c3fac8891777df8dab813320a410c696ef762 Mon Sep 17 00:00:00 2001 From: "Pai, Radhika (rp592h)" Date: Tue, 20 Apr 2021 10:31:01 -0500 Subject: [PATCH] [Update] ES helm-test script updated This ps removes the test_api_object_creation function as the api_objects map is now more dynamic with ability to create, delete etc. This function throws error when it does a GET on the objects that first needs to be created(PUT). This function is no longer relevant with the updated create-templates job which is more robust. Change-Id: I9f37c86ae9ca4bf32c417880926b6a3c3e78cb8a --- elasticsearch/Chart.yaml | 2 +- .../templates/bin/_helm-tests.sh.tpl | 27 ------------------- releasenotes/notes/elasticsearch.yaml | 1 + 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index d692806ce..bead53171 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.3 +version: 0.2.4 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 79381733a..4e11907ec 100644 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ b/elasticsearch/templates/bin/_helm-tests.sh.tpl @@ -36,32 +36,6 @@ function create_test_index () { fi } -{{ if not (empty .Values.conf.api_objects) }} - -function test_api_object_creation () { - NUM_ERRORS=0 - {{ range $object, $config := .Values.conf.api_objects }} - error=$(curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \ - -XGET "${ELASTICSEARCH_ENDPOINT}/{{ $config.endpoint }}" | jq -r '.error') - - if [ $error == "null" ]; then - echo "PASS: {{ $object }} is verified." - else - echo "FAIL: Error for {{ $object }}: $(echo $error | jq -r)" - NUM_ERRORS=$(($NUM_ERRORS+1)) - fi - {{ end }} - - if [ $NUM_ERRORS -gt 0 ]; then - echo "FAIL: Some API Objects were not created!" - exit 1 - else - echo "PASS: API Objects are verified!" - fi -} - -{{ end }} - {{ if .Values.conf.elasticsearch.snapshots.enabled }} function check_snapshot_repositories_verified () { repositories=$(curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \ @@ -92,7 +66,6 @@ function remove_test_index () { remove_test_index || true create_test_index remove_test_index -test_api_object_creation {{ if .Values.conf.elasticsearch.snapshots.enabled }} check_snapshot_repositories_verified {{ end }} diff --git a/releasenotes/notes/elasticsearch.yaml b/releasenotes/notes/elasticsearch.yaml index 355cfc0d0..dad598e0e 100644 --- a/releasenotes/notes/elasticsearch.yaml +++ b/releasenotes/notes/elasticsearch.yaml @@ -13,4 +13,5 @@ elasticsearch: - 0.2.1 Make templates job more robust & allow overrides - 0.2.2 Update the ES curator config to {} - 0.2.3 Add configurable backoffLimit to templates job + - 0.2.4 Update helm-test script ...