Skip to content

Commit

Permalink
Changes for OpenSearch end-to-end tests (#4860)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Apr 4, 2024
1 parent 0e88ae0 commit f889a38
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 85 deletions.
2 changes: 2 additions & 0 deletions config/end_to_end/extract_and_output.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ RUN git clone $GIT_REPOSITORY

# Install Plaso dependencies.
WORKDIR /home/test/plaso

# Install Plaso and dependencies.
RUN ./config/linux/ubuntu_install_plaso.sh

# Configure container for running Plaso.
Expand Down
4 changes: 2 additions & 2 deletions config/jenkins/greendale/output_opensearch.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[output_opensearch]
case=output
case=analyze_and_output
output_file=studentpc1.csv
output_format=opensearch
output_options=--opensearch_mappings=plaso/data/opensearch.mappings
output_options=--opensearch_mappings=plaso/data/opensearch.mappings --opensearch_server=opensearch --opensearch_user=admin --opensearch_password=F0rT3st@nly
source=studentpc1.plaso
3 changes: 2 additions & 1 deletion config/jenkins/greendale/output_opensearch_ts.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[output_opensearch_ts]
case=output
case=analyze_and_output
output_file=studentpc1.csv
output_format=opensearch_ts
output_options=--opensearch_mappings=plaso/data/opensearch.mappings
source=studentpc1.plaso
4 changes: 2 additions & 2 deletions config/jenkins/greendale/psort-studentpc1-nsrlsvr.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[nsrlsvr]
case=output
case=analyze_and_output
analysis_options=--analysis nsrlsvr --nsrlsvr-port=9120
source=studentpc1.plaso
output_options=--analysis nsrlsvr --nsrlsvr-port=9120
output_file=studentpc1.csv
output_format=dynamic
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[sessionize-unique-domains]
case=output
case=analyze_and_output
analysis_options=--analysis sessionize,unique_domains_visited
source=studentpc1.plaso
output_options=--analysis sessionize,unique_domains_visited
output_file=studentpc1.csv
output_format=dynamic
4 changes: 2 additions & 2 deletions config/jenkins/greendale/psort-studentpc1-tagging.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tagging]
case=output
case=analyze_and_output
analysis_options=--analysis tagging --tagging-file=plaso/data/tag_windows.txt
source=studentpc1.plaso
output_options=--analysis=tagging --tagging-file=plaso/data/tag_windows.txt
output_file=studentpc1.csv
output_format=dynamic
74 changes: 0 additions & 74 deletions config/jenkins/linux/run_end_to_end_tests.sh

This file was deleted.

15 changes: 13 additions & 2 deletions config/jenkins/run_end_to_end_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,20 @@ RESULTS_DIRECTORY="${PWD}/plaso-out";

mkdir -p "${RESULTS_DIRECTORY}/profiling";

# Build the extract_and_output end-to-end test Docker image.
# Build the end-to-end test Docker image.
docker build -f extract_and_output.Dockerfile --force-rm --no-cache -t log2timeline/plaso . ;

docker run log2timeline/plaso ./utils/check_dependencies.py;

docker run -v "${CONFIGURATION_DIRECTORY}:/config:z" -v "${RESULTS_DIRECTORY}:/home/test/plaso/plaso-out:z" -v "${SOURCES_DIRECTORY}:/sources:z" log2timeline/plaso /bin/bash -c "./tests/end-to-end.py --config /config/${CONFIGURATION_NAME}.ini --references-directory test_data/end_to_end --results-directory /home/test/plaso/plaso-out --sources-directory /sources --scripts-directory plaso/scripts"
COMMAND="./tests/end-to-end.py --config /config/${CONFIGURATION_NAME}.ini --references-directory test_data/end_to_end --results-directory /home/test/plaso/plaso-out --sources-directory /sources --scripts-directory plaso/scripts";

if test ${CONFIGURATION_NAME} = "output_opensearch";
then
DOCKER_NETWORK="--network=opensearch-network";

elif test ${CONFIGURATION_NAME} = "studentpc1-redis";
then
DOCKER_NETWORK="--network=redis-network";
fi

docker run --name=plaso ${DOCKER_NETWORK} -v "${CONFIGURATION_DIRECTORY}:/config:z" -v "${RESULTS_DIRECTORY}:/home/test/plaso/plaso-out:z" -v "${SOURCES_DIRECTORY}:/sources:z" log2timeline/plaso /bin/bash -c "${COMMAND}"

0 comments on commit f889a38

Please sign in to comment.