[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
This commit is contained in:
parent
e3142120cb
commit
ed8c3fac88
@ -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
|
||||
|
@ -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 }}
|
||||
|
@ -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
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user