forked from wazuh/wazuh-docker
test CI
This commit is contained in:
@@ -48,6 +48,16 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Check documents into wazuh-alerts index
|
||||||
|
run: |
|
||||||
|
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`"
|
||||||
|
if [[ $docs -gt 0 ]]; then
|
||||||
|
echo "wazuh-alerts index documents: ${docs}"
|
||||||
|
else
|
||||||
|
echo "wazuh-alerts index documents: ${docs}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check Wazuh manager start
|
- name: Check Wazuh manager start
|
||||||
run: |
|
run: |
|
||||||
curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"
|
curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"
|
||||||
@@ -88,8 +98,17 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Check documents into wazuh-alerts index
|
||||||
|
run: |
|
||||||
|
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`"
|
||||||
|
if [[ $docs -gt 0 ]]; then
|
||||||
|
echo "wazuh-alerts index documents: ${docs}"
|
||||||
|
else
|
||||||
|
echo "wazuh-alerts index documents: ${docs}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check Wazuh manager start
|
- name: Check Wazuh manager start
|
||||||
# uses: sergeysova/jq-action@v2
|
|
||||||
run: |
|
run: |
|
||||||
nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l)
|
nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l)
|
||||||
if [[ $nodes -eq 2 ]]; then
|
if [[ $nodes -eq 2 ]]; then
|
||||||
@@ -101,7 +120,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
||||||
|
|
||||||
|
|
||||||
- name: Check Wazuh dashboard service URL
|
- name: Check Wazuh dashboard service URL
|
||||||
run: |
|
run: |
|
||||||
status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}')
|
status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}')
|
||||||
|
|||||||
Reference in New Issue
Block a user