From ba3409acee17b23263649c7ce75c742e951ee43e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 27 May 2022 13:20:44 -0300 Subject: [PATCH] test CI --- .github/workflows/push.yml | 10 ++++++++-- single-node/prueba.sh | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 single-node/prueba.sh diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index faa2c278..60f2f843 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,7 +40,13 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + if [[ $nodes -eq 1 ]]; then + echo "Cantidad de nodos: ${nodes}" + else + echo "Cantidad de nodos: ${nodes}" + exit 1 + fi - name: Check Wazuh manager start run: | @@ -67,7 +73,7 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | diff --git a/single-node/prueba.sh b/single-node/prueba.sh new file mode 100755 index 00000000..7393163e --- /dev/null +++ b/single-node/prueba.sh @@ -0,0 +1,6 @@ +nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" +if [[ $nodes -eq 1 ]]; then + echo "bien" +else + echo "mal" +fi