-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from ryanohoro/test_tastes
Tests For Mime/Yara Tastes and Scanner Assignments
- Loading branch information
Showing
17 changed files
with
904 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ FROM ubuntu:22.04 | |
ARG DEBIAN_FRONTEND=noninteractive | ||
LABEL maintainer="Target Brands, Inc. [email protected]" | ||
|
||
ARG CONFIG_TESTS=false | ||
|
||
ARG USERNAME=strelka | ||
ARG USER_UID=1001 | ||
ARG USER_GID=$USER_UID | ||
|
@@ -185,12 +187,13 @@ RUN cd /strelka/ && \ | |
chmod -R g=u /var/log/strelka/ | ||
|
||
# Run tests as non-root user | ||
USER $username | ||
USER $USERNAME | ||
|
||
# Run build checks | ||
RUN echo '[+] Run checks' && \ | ||
RUN echo '[+] Run build checks' && \ | ||
cd /strelka/strelka/ && \ | ||
python3 -m pytest -s tests/ && \ | ||
if $CONFIG_TESTS; then python3 -m pytest -s tests_configuration/; fi && \ | ||
echo '[+] Done' | ||
|
||
USER root | ||
|
@@ -202,4 +205,4 @@ RUN cd /strelka/ && \ | |
# Remove config directory (will bind mount once built) | ||
RUN rm -rf /etc/strelka/ | ||
|
||
USER $username | ||
USER $USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.