From 79ffbb5b9f94302392f879bc5449dcbaa0adca3d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:30:44 +0800 Subject: [PATCH] Impove security plugin enabling check (#792) (#804) (cherry picked from commit e0ba777fea267c58c3f39852612c6c53b6d7ddf1) Signed-off-by: Hailong Cui Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../workflows/security-notifications-test-workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/security-notifications-test-workflow.yml b/.github/workflows/security-notifications-test-workflow.yml index b54a86ce..f9e40368 100644 --- a/.github/workflows/security-notifications-test-workflow.yml +++ b/.github/workflows/security-notifications-test-workflow.yml @@ -79,10 +79,10 @@ jobs: - name: Run Notification Test for security enabled test cases if: env.imagePresent == 'true' run: | - cluster_running=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure` - echo $cluster_running - security=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure |grep opensearch-security|wc -l` - echo $security + container_id=`docker ps -q` + plugins=`docker exec $container_id /usr/share/opensearch/bin/opensearch-plugin list` + echo "plugins: $plugins" + security=`echo $plugins | grep opensearch-security | wc -l` if [ $security -gt 0 ] then echo "Security plugin is available" @@ -91,4 +91,4 @@ jobs: else echo "Security plugin is NOT available skipping this run as tests without security have already been run" exit 1 - fi \ No newline at end of file + fi