Skip to content

Commit

Permalink
verify the content of the opensearch_dashboards.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano committed Dec 26, 2023
1 parent 17ac65c commit fec5ddd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dev-tools/test-packages/test-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ files_exist() {
done
}

check_opensearch_dashboard_yml() {
docker cp ../../config/opensearch_dashboards.prod.yml $CONTAINER_NAME:/tmp/opensearch_dashboards.yml

diff_opensearch_dashboard_yml=$(docker exec $CONTAINER_NAME diff /etc/wazuh-dashboard/opensearch_dashboards.yml /tmp/opensearch_dashboards.yml)

if [ -n "$diff_opensearch_dashboard_yml" ]; then
echo "ERROR: opensearch_dashboards.yml is not the same as the one in the package"
echo $diff_opensearch_dashboard_yml
clean
exit 1
fi
echo $(docker exec $CONTAINER_NAME diff /etc/wazuh-dashboard/opensearch_dashboards.yml /tmp/opensearch_dashboards.yml)
echo "opensearch_dashboards.yml is the same as the one in the package"
}

# Run test
test() {

Expand All @@ -49,6 +64,8 @@ test() {
fi

files_exist

check_opensearch_dashboard_yml
}

# Show help
Expand Down

0 comments on commit fec5ddd

Please sign in to comment.