From 2b5eeaef7eec9770a288bcad0f45728683b50b88 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Sat, 21 Oct 2023 00:55:06 +0800 Subject: [PATCH] Improve security plugin enabling check (#1017) Signed-off-by: Hailong Cui Signed-off-by: Joshua Au --- .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 590686ae0..a3177cd1b 100644 --- a/.github/workflows/docker-security-test-workflow.yml +++ b/.github/workflows/docker-security-test-workflow.yml @@ -66,9 +66,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