Set default python

Python needs to be set to python2 before checking for python3 to prevent
certain test framework errors.

Change-Id: Ifd1ed35160338688d3c723c055ca75cd999e46e0
This commit is contained in:
Ritchie, Frank (fr801x) 2022-06-24 14:16:52 -04:00 committed by Alexey
parent 3e1572c959
commit 4f0f5155e7
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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!";

View File

@ -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
...