Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script test packages #133

Merged
merged 5 commits into from
Jan 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
verify the content of the opensearch_dashboards.yml
  • Loading branch information
yenienserrano committed Dec 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fec5ddd42a89d164e850959faf13f9e6f7eab1e5
17 changes: 17 additions & 0 deletions dev-tools/test-packages/test-packages.sh
Original file line number Diff line number Diff line change
@@ -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() {

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

files_exist

check_opensearch_dashboard_yml
}

# Show help
Loading