From c71c300a5fab708a9eb9bde52574509e48094cc3 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Mon, 16 Oct 2023 11:51:39 +0800 Subject: [PATCH] Impove security plugin enabling check Signed-off-by: Hailong Cui --- .../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 0d77cf7a..31352b76 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