From 4f0f5155e7aa2da8366f4fef7f559fadfb6fb325 Mon Sep 17 00:00:00 2001 From: "Ritchie, Frank (fr801x)" Date: Fri, 24 Jun 2022 14:16:52 -0400 Subject: [PATCH] Set default python Python needs to be set to python2 before checking for python3 to prevent certain test framework errors. Change-Id: Ifd1ed35160338688d3c723c055ca75cd999e46e0 --- elasticsearch/Chart.yaml | 2 +- elasticsearch/templates/bin/_helm-tests.sh.tpl | 5 +++-- releasenotes/notes/elasticsearch.yaml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index 38948d7a2..d7f5363e9 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.19 +version: 0.2.20 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 bd980398f..e6c98ab70 100644 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ b/elasticsearch/templates/bin/_helm-tests.sh.tpl @@ -15,8 +15,9 @@ limitations under the License. set -ex +python='python' if [[ $(which python3) ]]; then - alias python=python3 + python='python3' fi function create_test_index () { @@ -30,7 +31,7 @@ function create_test_index () { } } } - ' | python -c "import sys, json; print(json.load(sys.stdin)['acknowledged'])") + ' | $python -c "import sys, json; print(json.load(sys.stdin)['acknowledged'])") if [ "$index_result" == "True" ]; then echo "PASS: Test index created!"; diff --git a/releasenotes/notes/elasticsearch.yaml b/releasenotes/notes/elasticsearch.yaml index 1afbe11ca..0675888b4 100644 --- a/releasenotes/notes/elasticsearch.yaml +++ b/releasenotes/notes/elasticsearch.yaml @@ -29,4 +29,5 @@ elasticsearch: - 0.2.17 Annotate ES master/data sts with S3 secret hash - 0.2.18 Update default image value to Wallaby - 0.2.19 Migrated CronJob resource to batch/v1 API version + - 0.2.20 Set default python for helm test ...