You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ot...@apache.org on 2019/05/03 14:41:07 UTC
[metron] branch master updated: METRON-2018 Update prepare-commit
to add Bro plugin tests (ottobackwards) closes apache/metron#1348
This is an automated email from the ASF dual-hosted git repository.
otto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/metron.git
The following commit(s) were added to refs/heads/master by this push:
new f3f5c97 METRON-2018 Update prepare-commit to add Bro plugin tests (ottobackwards) closes apache/metron#1348
f3f5c97 is described below
commit f3f5c9743f515d8902b4580c765ad9d2b64aa63b
Author: ottobackwards <ot...@gmail.com>
AuthorDate: Fri May 3 10:40:47 2019 -0400
METRON-2018 Update prepare-commit to add Bro plugin tests (ottobackwards) closes apache/metron#1348
---
.../committer-utils/metron-committer-common | 43 +++++++++++++++++++++-
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/dev-utilities/committer-utils/metron-committer-common b/dev-utilities/committer-utils/metron-committer-common
index 4855254..257bcb0 100644
--- a/dev-utilities/committer-utils/metron-committer-common
+++ b/dev-utilities/committer-utils/metron-committer-common
@@ -343,8 +343,18 @@ function run_tests {
run_mvn_build_rpms
verify_licenses
+
elif [[ "${UPSTREAM}" == "${BRO_PLUGIN_UPSTREAM}" ]]; then
- echo "We don't currently support running metron-bro-plugin-kafka tests in this script"
+ echo " please verify that no bro docker containers are running before continuing,"
+ read -p " no bro docker containers are running, ready to proceed [yN] " -n 1 -r
+ echo
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
+ run_bro_docker
+ finish_bro_docker
+ else
+ echo " when you are ready and the containers are stopped, please cd into the docker"
+ echo " directory and execute the run_end_to_end.sh script"
+ fi
fi
fi
@@ -435,6 +445,35 @@ function run_mvn_build_rpms {
}
#
+# runs the bro kafka plugin's docker based tests
+#
+function run_bro_docker {
+ cd docker &> /dev/null || { echo "failed to change directory to docker" ; exit 1; }
+ ./run_end_to_end.sh
+
+ rc=$?; if [[ ${rc} != 0 ]]; then
+ echo "ERROR> FAILED run_end_to_end"
+ # do NOT exit here
+ fi
+ cd .. &> /dev/null || { echo "failed to change directory to plugin root"; exit 1; }
+}
+
+#
+# runs the finish bro docker script to cleanup
+#
+function finish_bro_docker {
+ cd docker &> /dev/null || { echo "failed to change directory to docker"; exit 1; }
+ ./finish_end_to_end.sh
+
+ rc=$?; if [[ ${rc} != 0 ]]; then
+ echo "ERROR> FAILED finish_end_to_end"
+ exit ${rc}
+ fi
+ cd .. &> /dev/null || { echo "failed to change directory to plugin root";
+ exit 1; }
+}
+
+#
# verifies licenses using our script
#
function verify_licenses {
@@ -455,4 +494,4 @@ function please_review_then {
echo " cd $WORK"
echo " git push upstream $BASE_BRANCH"
echo ""
-}
\ No newline at end of file
+}