Skip to content

Commit

Permalink
Update logic to be the same across all repos
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Dec 28, 2023
1 parent 7bb465e commit b47c3d9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,13 @@ then
SECURITY_ENABLED="true"
fi

IFS='.' read -ra version_array <<< "$VERSION"



if [ -z "$CREDENTIAL" ]
then
# Starting in 2.12.0, security demo configuration script requires an initial admin password
if (( ${version_array[0]} > 2 || (${version_array[0]} == 2 && ${version_array[1]} >= 12) )); then
CREDENTIAL="admin:myStrongPassword123!"
# OpenSearch 2.12 onwards security plugins requires a password to be set to setup admin user
if [ "$(echo "${VERSION} 2.12" | awk '{print ($1 >= $2)}')" -eq 1 ]; then
CREDENTIAL="admin:myStrongPassword123!"
else
CREDENTIAL="admin:admin"
CREDENTIAL="admin:admin"
fi
fi

Expand Down

0 comments on commit b47c3d9

Please sign in to comment.