Skip to content

Commit

Permalink
tests: improve comparaison
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse committed Jul 20, 2023
1 parent c534905 commit 3495ea2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
3 changes: 3 additions & 0 deletions tests/base.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ docker_test() {
if [ -f "tests/expected/$output_file.log" ]; then
[ "$(diff --strip-trailing-cr "tests/output/$output_file-comp.log" "tests/expected/$output_file.log")" = "" ]
fi
if [ -f "tests/expected/uniq-$output_file.log" ]; then
[ "$(diff --strip-trailing-cr <(sort -u "tests/output/$output_file-comp.log") "tests/expected/uniq-$output_file.log")" = "" ]
fi
}
13 changes: 0 additions & 13 deletions tests/expected/output-electron-security-warning.log

This file was deleted.

File renamed without changes.
8 changes: 8 additions & 0 deletions tests/expected/uniq-output-electron-security-warning.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
Exiting GPU process due to errors during initialization
Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Floss manager not present, cannot set Floss enable/disable.
InitializeSandbox() called with multiple threads in process gpu-process.
dri3 extension not supported.
file1.drawio -> file1.pdf
6 changes: 3 additions & 3 deletions tests/timeout.bats
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
. tests/base.bats

@test "Timeout for using create command" {
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "no_output" "tests" --create output/empty.drawio
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "output-nothing" "tests" --create output/empty.drawio
}

@test "Timeout for using check command" {
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "no_output" "tests" --check output/empty.drawio
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "output-nothing" "tests" --check output/empty.drawio
}

@test "Timeout for using wrong command" {
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "no_output" "tests/data" --wrong-command
docker_test "-e DRAWIO_DESKTOP_COMMAND_TIMEOUT=2s" 1 "output-nothing" "tests/data" --wrong-command
}

0 comments on commit 3495ea2

Please sign in to comment.