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

fix: use previous election security warning filtering #88

Merged
merged 3 commits into from Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -2,7 +2,7 @@ FROM rust:buster as drawio-exporter-installer

RUN cargo install --version 1.2.0 drawio-exporter

FROM rlespinasse/drawio-desktop-headless:v1.7.0
FROM rlespinasse/drawio-desktop-headless:v1.7.1

WORKDIR /opt/drawio-exporter
COPY --from=drawio-exporter-installer /usr/local/cargo/bin/drawio-exporter .
Expand Down
7 changes: 4 additions & 3 deletions scripts/runner.sh
@@ -1,15 +1,16 @@
#!/usr/bin/env bash
set -e
set -euo pipefail

if [ "${ELECTRON_DISABLE_SECURITY_WARNINGS}" == "true" ]; then
"$DRAWIO_DESKTOP_EXECUTABLE_PATH" --drawio-desktop-headless "$@" 3>&1 >&2 2>&3 3>&- |
"$DRAWIO_DESKTOP_EXECUTABLE_PATH" --drawio-desktop-headless "$@" 2>&1 |
grep -v "Failed to connect to socket" |
grep -v "Could not parse server address" |
grep -v "Floss manager not present" |
grep -v "Exiting GPU process" |
grep -v "called with multiple threads" |
grep -v "extension not supported" |
grep -v "Failed to send GpuControl.CreateCommandBuffer"
grep -v "Failed to send GpuControl.CreateCommandBuffer" |
grep -v "Init observer found at shutdown"
else
"$DRAWIO_DESKTOP_EXECUTABLE_PATH" --drawio-desktop-headless "$@" 2>&1
fi
8 changes: 6 additions & 2 deletions tests/base.bats
Expand Up @@ -9,12 +9,16 @@ docker_test() {
shift
shift
shift

# shellcheck disable=SC2086,SC2046
run docker container run -t $docker_opts -w /data -v $(pwd)/${data_folder:-}:/data ${DOCKER_IMAGE} "$@"

echo "$output" > "tests/output/$output_file.log"
# shellcheck disable=SC2154
echo "$output" | tee "tests/output/$output_file.log" | sed 's#\[.*:.*/.*\..*:.*:.*\(.*\)\] ##' >"tests/output/$output_file-comp.log"

# shellcheck disable=SC2086
[ "$status" -eq $status ]
if [ -f "tests/expected/$output_file.log" ]; then
[ "$(diff --strip-trailing-cr <(echo "$output") "tests/expected/$output_file.log")" = "" ]
[ "$(diff --strip-trailing-cr "tests/output/$output_file-comp.log" "tests/expected/$output_file.log")" = "" ]
fi
}