Prettify BATS output

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2024-08-26 20:30:49 +02:00
parent 764b0db601
commit 75f11f3f4f
3 changed files with 14 additions and 1 deletions
+9
View File
@@ -13,6 +13,15 @@ ENV GIT_TAG=${GIT_TAG}
ARG BUILD_OPTS=""
ENV BUILD_OPTS=${BUILD_OPTS}
# Add ncurses used for pretty output in bats tests
RUN apk add --no-cache ncurses
ENV TERM=xterm
# Monkeypatch BATS to remove duplicate output of starting and finished test
# BATS uses ANSI escape codes to overwrite the line after the test has finished
# This is not supported by Github Actions as it does not provide a TTY to the docker build container
RUN sed -i '/buffer_with_truncation /d' /bats-core/libexec/bats-core/bats-format-pretty
# Build FTL
# Remove possible old build files
RUN rm -rf cmake && \
+1 -1
View File
@@ -106,7 +106,7 @@ echo -n "Contained dnsmasq version (DNS): "
dig TXT CHAOS version.bind @127.0.0.1 +short
# Run tests
$BATS "test/test_suite.bats"
$BATS -p "test/test_suite.bats"
RET=$?
curl_to_tricorder() {
+4
View File
@@ -1,5 +1,9 @@
#!./test/libs/bats/bin/bats
@test 'fail()' {
fail 'this test always fails'
}
@test "Compare template and test TOML config files" {
# We skip the first 5 lines of the files as they contain the version and
# timestamp of the file creation/modification