From 4c9e84b243adebadc1acf60507c6e66c17c943d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 16:55:35 +0000 Subject: [PATCH] Improve security plugin enabling check (#1017) Signed-off-by: Hailong Cui (cherry picked from commit 6aad0be3ae4d62074c95176e87a158204c92a164) Signed-off-by: github-actions[bot] --- .github/workflows/docker-security-test-workflow.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-security-test-workflow.yml b/.github/workflows/docker-security-test-workflow.yml index ee880366c..d9d184f70 100644 --- a/.github/workflows/docker-security-test-workflow.yml +++ b/.github/workflows/docker-security-test-workflow.yml @@ -64,9 +64,10 @@ jobs: - name: Run Index Management 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` + 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` echo $security if [ $security -gt 0 ] then