always disable fed, evict admins, and forget the room when banning a room
Signed-off-by: June Clementine Strawberry <june@3.dog>
This commit is contained in:
parent
ef96e7afac
commit
5efe804a20
4 changed files with 109 additions and 259 deletions
|
@ -15,7 +15,7 @@ LOG_FILE="${2:-complement_test_logs.jsonl}"
|
|||
# A `.jsonl` file to write test results to
|
||||
RESULTS_FILE="${3:-complement_test_results.jsonl}"
|
||||
|
||||
COMPLEMENT_OCI_IMAGE="${COMPLEMENT_OCI_IMAGE:-complement-conduwuit:main}"
|
||||
COMPLEMENT_BASE_IMAGE="${COMPLEMENT_BASE_IMAGE:-complement-conduwuit:main}"
|
||||
|
||||
# Complement tests that are skipped due to flakiness/reliability issues or we don't implement such features and won't for a long time
|
||||
#SKIPPED_COMPLEMENT_TESTS='-skip=TestPartialStateJoin.*'
|
||||
|
@ -62,12 +62,13 @@ echo "\$LOG_FILE: $LOG_FILE"
|
|||
echo ""
|
||||
|
||||
# It's okay (likely, even) that `go test` exits nonzero
|
||||
# `COMPLEMENT_ENABLE_DIRTY_RUNS=1` reuses the same complement container for faster complement, at the possible expense of test environment pollution
|
||||
set +o pipefail
|
||||
env \
|
||||
-C "$COMPLEMENT_SRC" \
|
||||
COMPLEMENT_BASE_IMAGE="$COMPLEMENT_OCI_IMAGE" \
|
||||
COMPLEMENT_ENABLE_DIRTY_RUNS=1 \ # reuses the same complement container for faster complement, at the possible expense of test environment pollution
|
||||
go test -tags="conduwuit_blacklist" -v -timeout 1h -json ./tests/... | tee "$LOG_FILE"
|
||||
COMPLEMENT_BASE_IMAGE="$COMPLEMENT_BASE_IMAGE" \
|
||||
COMPLEMENT_ENABLE_DIRTY_RUNS=1 \
|
||||
go test -tags="conduwuit_blacklist" -timeout 1h -json ./tests/... | tee "$LOG_FILE"
|
||||
set -o pipefail
|
||||
|
||||
# Post-process the results into an easy-to-compare format, sorted by Test name for reproducible results
|
||||
|
@ -78,12 +79,17 @@ cat "$LOG_FILE" | jq -s -c 'sort_by(.Test)[]' | jq -c '
|
|||
) | {Action: .Action, Test: .Test}
|
||||
' > "$RESULTS_FILE"
|
||||
|
||||
grep '^{"Time":' "$LOG_FILE" | gotestfmt > "${LOG_FILE}_gotestfmt.log"
|
||||
if command -v gotestfmt &> /dev/null; then
|
||||
echo "using gotestfmt on $LOG_FILE"
|
||||
grep '^{"Time":' "$LOG_FILE" | gotestfmt > "complement_test_logs_gotestfmt.log"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "complement logs saved at $LOG_FILE"
|
||||
echo "complement results saved at $RESULTS_FILE"
|
||||
echo "complement logs in gotestfmt pretty format outputted at ${LOG_FILE}_gotestfmt.log (use an editor/terminal that interprets ANSI colours)"
|
||||
if command -v gotestfmt &> /dev/null; then
|
||||
echo "complement logs in gotestfmt pretty format outputted at complement_test_logs_gotestfmt.log (use an editor/terminal/pager that interprets ANSI colours and UTF-8 emojis)"
|
||||
fi
|
||||
echo ""
|
||||
echo ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue