Skip to content

Commit

Permalink
Pass in cred to admin credentials based on version to alerting integt…
Browse files Browse the repository at this point in the history
…est (opensearch-project#4403)

Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Feb 5, 2024
1 parent ec71ce6 commit 65ddd1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/components/alerting/integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,16 @@ then
SNAPSHOT="false"
fi

OPENSEARCH_REQUIRED_VERSION="2.12.0"
if [ -z "$CREDENTIAL" ]
then
CREDENTIAL="admin:admin"
# Starting in 2.12.0, security demo configuration script requires an initial admin password
COMPARE_VERSION=`echo $OPENSEARCH_REQUIRED_VERSION $OPENSEARCH_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
if [ "$COMPARE_VERSION" != "$OPENSEARCH_REQUIRED_VERSION" ]; then
CREDENTIAL="admin:admin"
else
CREDENTIAL="admin:myStrongPassword123!"
fi
fi

USERNAME=`echo $CREDENTIAL | awk -F ':' '{print $1}'`
Expand Down

0 comments on commit 65ddd1f

Please sign in to comment.