recipe-maintainer: public snapshot (secrets + deployment plans removed, single commit)
Sanitized single-commit public mirror of recipe-maintainer. - Removed test-ssh/.testenv (live creds); added test-ssh/.testenv.example placeholders. - Removed plans/ and planned-updates/ (deployment-planning docs) so no client/ deployment domains appear in the public repo. - All other secret stores were already gitignored. - docs.coopcloud.tech retained as a submodule (public upstream).
This commit is contained in:
+137
@@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
# Test: verify synapse_auto_compressor actually compresses bloated state
|
||||
#
|
||||
# Creates state groups WITHOUT edges (full snapshots), which is how
|
||||
# Synapse creates bloat in practice. The compressor should create
|
||||
# edges between them and convert full snapshots to deltas.
|
||||
set -euo pipefail
|
||||
|
||||
SERVER="cctest.autonomic.zone"
|
||||
STACK_NAME="matrix-synapse_cctest_autonomic_zone"
|
||||
|
||||
echo "=== Test: compress-state removes redundant state_groups_state rows ==="
|
||||
|
||||
DB_CONTAINER=$(ssh "$SERVER" "docker ps --filter name=${STACK_NAME}_db --format '{{.ID}}'" | head -1)
|
||||
if [ -z "$DB_CONTAINER" ]; then
|
||||
echo "FAIL: Could not find db container"
|
||||
exit 1
|
||||
fi
|
||||
echo "DB container: $DB_CONTAINER"
|
||||
|
||||
run_sql() {
|
||||
local tmpfile=$(ssh "$SERVER" mktemp)
|
||||
echo "$1" | ssh "$SERVER" "cat > $tmpfile"
|
||||
ssh "$SERVER" "docker cp $tmpfile $DB_CONTAINER:/tmp/_query.sql && docker exec $DB_CONTAINER psql -U synapse -d synapse -t -A -f /tmp/_query.sql && rm -f $tmpfile"
|
||||
}
|
||||
|
||||
ROOM_ID='!compress_test3:test.local'
|
||||
NUM_MEMBERS=20
|
||||
NUM_GROUPS=200
|
||||
|
||||
# Full cleanup: all test data AND all compressor progress tables
|
||||
run_sql "
|
||||
DELETE FROM state_groups_state WHERE room_id LIKE '!compress_test%';
|
||||
DELETE FROM state_group_edges WHERE state_group IN (SELECT id FROM state_groups WHERE room_id LIKE '!compress_test%');
|
||||
DELETE FROM state_groups WHERE room_id LIKE '!compress_test%';
|
||||
TRUNCATE state_compressor_state;
|
||||
TRUNCATE state_compressor_progress;
|
||||
TRUNCATE state_compressor_total_progress;
|
||||
" > /dev/null 2>&1 || true
|
||||
|
||||
MAX_SG=$(run_sql "SELECT COALESCE(MAX(id), 0) FROM state_groups;")
|
||||
echo "Current max state_group id: $MAX_SG"
|
||||
BASE=$((MAX_SG + 1000))
|
||||
|
||||
echo "Generating $NUM_GROUPS full-snapshot state groups (no edges) with $NUM_MEMBERS members..."
|
||||
|
||||
SQL_FILE=$(mktemp /tmp/compress_test_XXXXXX.sql)
|
||||
echo "BEGIN;" > "$SQL_FILE"
|
||||
|
||||
declare -A CURRENT_EVENT
|
||||
for m in $(seq 1 $NUM_MEMBERS); do
|
||||
CURRENT_EVENT[$m]="mem_${m}_v0"
|
||||
done
|
||||
|
||||
for g in $(seq 0 $((NUM_GROUPS - 1))); do
|
||||
SG_ID=$((BASE + g))
|
||||
|
||||
echo "INSERT INTO state_groups (id, room_id, event_id) VALUES ($SG_ID, '$ROOM_ID', 'ev_g${g}');" >> "$SQL_FILE"
|
||||
|
||||
# NO edges — each group is a standalone full snapshot
|
||||
|
||||
# One member changes per group
|
||||
CHANGING=$(( (g % NUM_MEMBERS) + 1 ))
|
||||
CURRENT_EVENT[$CHANGING]="mem_${CHANGING}_v${g}"
|
||||
|
||||
# Store ALL state in every group
|
||||
for m in $(seq 1 $NUM_MEMBERS); do
|
||||
EV="${CURRENT_EVENT[$m]}"
|
||||
echo "INSERT INTO state_groups_state (state_group, room_id, type, state_key, event_id) VALUES ($SG_ID, '$ROOM_ID', 'm.room.member', '@user${m}:test.local', '${EV}');" >> "$SQL_FILE"
|
||||
done
|
||||
|
||||
echo "INSERT INTO state_groups_state (state_group, room_id, type, state_key, event_id) VALUES ($SG_ID, '$ROOM_ID', 'm.room.create', '', 'create_ev');" >> "$SQL_FILE"
|
||||
echo "INSERT INTO state_groups_state (state_group, room_id, type, state_key, event_id) VALUES ($SG_ID, '$ROOM_ID', 'm.room.name', '', 'name_ev');" >> "$SQL_FILE"
|
||||
echo "INSERT INTO state_groups_state (state_group, room_id, type, state_key, event_id) VALUES ($SG_ID, '$ROOM_ID', 'm.room.topic', '', 'topic_ev');" >> "$SQL_FILE"
|
||||
done
|
||||
|
||||
echo "COMMIT;" >> "$SQL_FILE"
|
||||
|
||||
echo "Generated $(wc -l < "$SQL_FILE") lines of SQL"
|
||||
|
||||
echo "Inserting test data..."
|
||||
scp -q "$SQL_FILE" "$SERVER:/tmp/compress_test.sql"
|
||||
ssh "$SERVER" "docker cp /tmp/compress_test.sql $DB_CONTAINER:/tmp/compress_test.sql"
|
||||
ssh "$SERVER" "docker exec $DB_CONTAINER psql -U synapse -d synapse -f /tmp/compress_test.sql" > /dev/null 2>&1
|
||||
echo "Insert complete."
|
||||
rm -f "$SQL_FILE"
|
||||
|
||||
ROWS_AFTER_INSERT=$(run_sql "SELECT COUNT(*) FROM state_groups_state WHERE room_id = '$ROOM_ID';")
|
||||
EDGES_BEFORE=$(run_sql "SELECT COUNT(*) FROM state_group_edges WHERE state_group IN (SELECT id FROM state_groups WHERE room_id = '$ROOM_ID');")
|
||||
echo "Rows in state_groups_state: $ROWS_AFTER_INSERT"
|
||||
echo "Edges in state_group_edges: $EDGES_BEFORE"
|
||||
|
||||
echo ""
|
||||
echo "Running synapse_auto_compressor..."
|
||||
COMPRESS_CONTAINER=$(ssh "$SERVER" "docker ps --filter name=${STACK_NAME}_compress-state --format '{{.ID}}'" | head -1)
|
||||
if [ -z "$COMPRESS_CONTAINER" ]; then
|
||||
echo "FAIL: Could not find compress-state container"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DB_PASS=$(ssh "$SERVER" "docker exec $DB_CONTAINER cat /run/secrets/db_password")
|
||||
|
||||
COMPRESS_OUTPUT=$(ssh "$SERVER" "docker exec $COMPRESS_CONTAINER /build/synapse_auto_compressor \
|
||||
-p 'postgresql://synapse:${DB_PASS}@db:5432/synapse' \
|
||||
-c 100 -n 10 2>&1") || true
|
||||
echo "$COMPRESS_OUTPUT"
|
||||
|
||||
ROWS_AFTER_COMPRESS=$(run_sql "SELECT COUNT(*) FROM state_groups_state WHERE room_id = '$ROOM_ID';")
|
||||
EDGES_AFTER=$(run_sql "SELECT COUNT(*) FROM state_group_edges WHERE state_group IN (SELECT id FROM state_groups WHERE room_id = '$ROOM_ID');")
|
||||
echo ""
|
||||
echo "=== Results ==="
|
||||
echo "Rows BEFORE compression: $ROWS_AFTER_INSERT"
|
||||
echo "Rows AFTER compression: $ROWS_AFTER_COMPRESS"
|
||||
SAVED=$((ROWS_AFTER_INSERT - ROWS_AFTER_COMPRESS))
|
||||
echo "Rows saved: $SAVED"
|
||||
echo "Edges BEFORE: $EDGES_BEFORE"
|
||||
echo "Edges AFTER: $EDGES_AFTER"
|
||||
|
||||
if [ "$SAVED" -gt 0 ]; then
|
||||
PCT=$((SAVED * 100 / ROWS_AFTER_INSERT))
|
||||
echo "Compression ratio: ${PCT}%"
|
||||
echo ""
|
||||
echo "PASS: Compressor removed $SAVED redundant rows (${PCT}% reduction)"
|
||||
else
|
||||
echo ""
|
||||
echo "FAIL: Compressor did not remove any rows"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
echo ""
|
||||
echo "Cleaning up test data..."
|
||||
run_sql "DELETE FROM state_groups_state WHERE room_id = '$ROOM_ID';
|
||||
DELETE FROM state_group_edges WHERE state_group IN (SELECT id FROM state_groups WHERE room_id = '$ROOM_ID');
|
||||
DELETE FROM state_groups WHERE room_id = '$ROOM_ID';" > /dev/null
|
||||
ssh "$SERVER" "rm -f /tmp/compress_test.sql"
|
||||
echo "Cleanup complete."
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# Test: verify room complexity limit blocks joining large remote rooms
|
||||
#
|
||||
# Tries to join a known large remote room (#community:matrix.org) and
|
||||
# verifies Synapse rejects the join due to complexity limits.
|
||||
# Requires: ROOM_COMPLEXITY_LIMIT set low enough (e.g. 10.0) and federation enabled.
|
||||
set -euo pipefail
|
||||
|
||||
SERVER="cctest.autonomic.zone"
|
||||
DOMAIN="matrix-synapse.cctest.autonomic.zone"
|
||||
STACK_NAME="matrix-synapse_cctest_autonomic_zone"
|
||||
ADMIN_USER="complexity_test_admin"
|
||||
ADMIN_PASS="complextest_pass_123"
|
||||
|
||||
echo "=== Test: room complexity limit blocks large remote rooms ==="
|
||||
|
||||
# Register admin user
|
||||
echo "Registering admin user..."
|
||||
ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
register_new_matrix_user -u $ADMIN_USER -p $ADMIN_PASS -a -c /data/homeserver.yaml http://localhost:8008 2>&1" || true
|
||||
|
||||
# Get token
|
||||
echo "Getting token..."
|
||||
TOKEN=$(ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{\"type\":\"m.login.password\",\"user\":\"$ADMIN_USER\",\"password\":\"$ADMIN_PASS\"}'" \
|
||||
| python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
|
||||
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "FAIL: Could not get token"
|
||||
exit 1
|
||||
fi
|
||||
echo "Token: ${TOKEN:0:20}..."
|
||||
|
||||
# Verify complexity limit is set
|
||||
echo ""
|
||||
echo "Checking homeserver config..."
|
||||
COMPLEXITY=$(ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
grep 'complexity:' /data/homeserver.yaml" | awk '{print $2}')
|
||||
echo "Configured complexity limit: $COMPLEXITY"
|
||||
|
||||
# Try to join #community:matrix.org (a large room with ~30k state events, complexity ~60)
|
||||
# This should be rejected because complexity 60 > limit 10
|
||||
LARGE_ROOM="%23community:matrix.org"
|
||||
echo ""
|
||||
echo "Attempting to join #community:matrix.org (should be rejected)..."
|
||||
RESULT=$(ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST 'http://localhost:8008/_matrix/client/r0/join/${LARGE_ROOM}' \
|
||||
-H 'Authorization: Bearer $TOKEN' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{}'")
|
||||
echo "Response: $RESULT"
|
||||
|
||||
# Check for complexity error
|
||||
if echo "$RESULT" | grep -qi "complex\|too large\|M_RESOURCE_LIMIT_EXCEEDED"; then
|
||||
echo ""
|
||||
echo "PASS: Room join rejected due to complexity limit"
|
||||
elif echo "$RESULT" | grep -qi "error"; then
|
||||
echo ""
|
||||
echo "Got an error (may be federation related, not complexity):"
|
||||
echo "$RESULT" | python3 -m json.tool 2>/dev/null || echo "$RESULT"
|
||||
echo ""
|
||||
echo "INCONCLUSIVE: Got an error but not clearly a complexity rejection"
|
||||
exit 1
|
||||
else
|
||||
echo ""
|
||||
echo "FAIL: Room join was not rejected — complexity limit may not be working"
|
||||
exit 1
|
||||
fi
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
#!/bin/bash
|
||||
# Test: verify all abra.sh database maintenance and purge commands
|
||||
#
|
||||
# Creates test data (admin user, rooms, messages) then exercises
|
||||
# every abra.sh command and checks for expected output.
|
||||
set -euo pipefail
|
||||
|
||||
SERVER="cctest.autonomic.zone"
|
||||
DOMAIN="matrix-synapse.cctest.autonomic.zone"
|
||||
STACK_NAME="matrix-synapse_cctest_autonomic_zone"
|
||||
ADMIN_USER="purgetest_admin"
|
||||
ADMIN_PASS="purgetest_pass_123"
|
||||
PASS=0
|
||||
FAIL=0
|
||||
|
||||
check() {
|
||||
local name="$1"
|
||||
local result="$2"
|
||||
local expected="$3"
|
||||
if echo "$result" | grep -q "$expected"; then
|
||||
echo " PASS: $name"
|
||||
PASS=$((PASS + 1))
|
||||
else
|
||||
echo " FAIL: $name (expected '$expected')"
|
||||
echo " Got: $result"
|
||||
FAIL=$((FAIL + 1))
|
||||
fi
|
||||
}
|
||||
|
||||
# Run abra cmd and strip ANSI escape sequences
|
||||
run_db_cmd() {
|
||||
script -qefc "abra app cmd $DOMAIN db $* --chaos --no-input" /dev/null 2>&1 | sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g' | grep -v '^\]'
|
||||
}
|
||||
|
||||
run_app_cmd() {
|
||||
script -qefc "abra app cmd $DOMAIN app $* --chaos --no-input" /dev/null 2>&1 | sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g' | grep -v '^\]'
|
||||
}
|
||||
|
||||
# Run curl inside the app container
|
||||
app_curl() {
|
||||
ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) curl -s $*"
|
||||
}
|
||||
|
||||
echo "=== Test: abra.sh database maintenance and purge commands ==="
|
||||
echo ""
|
||||
|
||||
# --- Setup: create admin user ---
|
||||
echo "--- Setup ---"
|
||||
|
||||
echo "Registering admin user..."
|
||||
REGISTER_OUT=$(run_app_cmd register_admin $ADMIN_USER $ADMIN_PASS 2>&1) || true
|
||||
if echo "$REGISTER_OUT" | grep -q "Success\|already"; then
|
||||
echo " Admin user ready"
|
||||
else
|
||||
echo " Register output: $REGISTER_OUT"
|
||||
fi
|
||||
|
||||
echo "Getting admin token..."
|
||||
TOKEN_RAW=$(run_app_cmd get_token $ADMIN_USER $ADMIN_PASS)
|
||||
TOKEN=$(echo "$TOKEN_RAW" | grep -oE 'syt_[A-Za-z0-9_]+' | head -1)
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo " FATAL: Could not get admin token"
|
||||
echo " Raw: $TOKEN_RAW"
|
||||
exit 1
|
||||
fi
|
||||
echo " Token: ${TOKEN:0:20}..."
|
||||
|
||||
# --- Create test data ---
|
||||
echo ""
|
||||
echo "--- Creating test data ---"
|
||||
|
||||
# Create a room with messages
|
||||
ROOM_ID=$(app_curl -X POST "http://localhost:8008/_matrix/client/r0/createRoom" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "'{"'"'"name"'"'":"'"'"Purge Test Room"'"'"}'" 2>/dev/null \
|
||||
| python3 -c "import sys,json; print(json.load(sys.stdin).get('room_id',''))" 2>/dev/null) || true
|
||||
|
||||
if [ -z "$ROOM_ID" ]; then
|
||||
# Try with simpler quoting
|
||||
ROOM_ID=$(ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST http://localhost:8008/_matrix/client/r0/createRoom \
|
||||
-H 'Authorization: Bearer $TOKEN' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{\"name\":\"Purge Test Room\"}'")
|
||||
ROOM_ID=$(echo "$ROOM_ID" | python3 -c "import sys,json; print(json.load(sys.stdin).get('room_id',''))")
|
||||
fi
|
||||
|
||||
if [ -z "$ROOM_ID" ]; then
|
||||
echo " FATAL: Could not create room"
|
||||
exit 1
|
||||
fi
|
||||
echo " Created room: $ROOM_ID"
|
||||
|
||||
# Send some messages
|
||||
for i in $(seq 1 5); do
|
||||
ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X PUT 'http://localhost:8008/_matrix/client/r0/rooms/${ROOM_ID}/send/m.room.message/msg${i}' \
|
||||
-H 'Authorization: Bearer $TOKEN' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{\"msgtype\":\"m.text\",\"body\":\"Test message ${i}\"}'" > /dev/null
|
||||
done
|
||||
echo " Sent 5 messages"
|
||||
|
||||
# Create a second room that the admin will leave (to test empty_rooms / purge_empty_rooms)
|
||||
EMPTY_ROOM_ID=$(ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST http://localhost:8008/_matrix/client/r0/createRoom \
|
||||
-H 'Authorization: Bearer $TOKEN' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{\"name\":\"Empty Test Room\"}'")
|
||||
EMPTY_ROOM_ID=$(echo "$EMPTY_ROOM_ID" | python3 -c "import sys,json; print(json.load(sys.stdin).get('room_id',''))")
|
||||
echo " Created empty room: $EMPTY_ROOM_ID"
|
||||
|
||||
# Leave and forget the empty room
|
||||
ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST 'http://localhost:8008/_matrix/client/r0/rooms/${EMPTY_ROOM_ID}/leave' \
|
||||
-H 'Authorization: Bearer $TOKEN'" > /dev/null
|
||||
ssh "$SERVER" "docker exec \$(docker ps --filter name=${STACK_NAME}_app -q) \
|
||||
curl -s -X POST 'http://localhost:8008/_matrix/client/r0/rooms/${EMPTY_ROOM_ID}/forget' \
|
||||
-H 'Authorization: Bearer $TOKEN'" > /dev/null
|
||||
echo " Left and forgot empty room"
|
||||
|
||||
echo ""
|
||||
echo "--- Testing db commands ---"
|
||||
|
||||
# Test db_size
|
||||
echo "Testing db_size..."
|
||||
RESULT=$(run_db_cmd db_size)
|
||||
check "db_size shows database size" "$RESULT" "db_size"
|
||||
check "db_size shows top tables" "$RESULT" "total_size"
|
||||
|
||||
# Test state_bloat
|
||||
echo "Testing state_bloat..."
|
||||
RESULT=$(run_db_cmd state_bloat)
|
||||
check "state_bloat shows header" "$RESULT" "state_entries"
|
||||
|
||||
# Test empty_rooms
|
||||
echo "Testing empty_rooms..."
|
||||
RESULT=$(run_db_cmd empty_rooms)
|
||||
check "empty_rooms shows header" "$RESULT" "room_id"
|
||||
|
||||
# Test reindex
|
||||
echo "Testing reindex..."
|
||||
RESULT=$(run_db_cmd reindex)
|
||||
check "reindex completes" "$RESULT" "REINDEX complete"
|
||||
check "reindex shows size" "$RESULT" "db_size"
|
||||
|
||||
# Test vacuum_full
|
||||
echo "Testing vacuum_full..."
|
||||
RESULT=$(run_db_cmd vacuum_full)
|
||||
check "vacuum_full completes" "$RESULT" "VACUUM FULL complete"
|
||||
check "vacuum_full shows size" "$RESULT" "db_size"
|
||||
|
||||
echo ""
|
||||
echo "--- Testing app commands ---"
|
||||
|
||||
# Test register_admin
|
||||
echo "Testing register_admin..."
|
||||
RESULT=$(run_app_cmd register_admin testadmin_new testpass_new_456)
|
||||
check "register_admin succeeds" "$RESULT" "Success"
|
||||
|
||||
# Test get_token
|
||||
echo "Testing get_token..."
|
||||
RESULT=$(run_app_cmd get_token $ADMIN_USER $ADMIN_PASS)
|
||||
check "get_token returns token" "$RESULT" "syt_"
|
||||
|
||||
# Test get_token with bad password
|
||||
echo "Testing get_token with bad password..."
|
||||
RESULT=$(run_app_cmd get_token $ADMIN_USER wrongpassword)
|
||||
check "get_token rejects bad password" "$RESULT" "Invalid"
|
||||
|
||||
# Test purge_remote_media
|
||||
echo "Testing purge_remote_media..."
|
||||
RESULT=$(run_app_cmd purge_remote_media 30 $TOKEN)
|
||||
check "purge_remote_media returns deleted count" "$RESULT" "deleted"
|
||||
|
||||
# Test purge_history
|
||||
echo "Testing purge_history..."
|
||||
RESULT=$(run_app_cmd purge_history $ROOM_ID 0 $TOKEN)
|
||||
check "purge_history returns purge_id" "$RESULT" "purge_id"
|
||||
|
||||
# Test purge_empty_rooms
|
||||
echo "Testing purge_empty_rooms..."
|
||||
RESULT=$(run_app_cmd purge_empty_rooms $TOKEN)
|
||||
check "purge_empty_rooms finds empty room" "$RESULT" "$EMPTY_ROOM_ID"
|
||||
|
||||
# Test purge_room (purge the main test room)
|
||||
echo "Testing purge_room..."
|
||||
RESULT=$(run_app_cmd purge_room $ROOM_ID $TOKEN)
|
||||
check "purge_room returns result" "$RESULT" "kicked_users"
|
||||
|
||||
# Test usage messages
|
||||
echo ""
|
||||
echo "--- Testing usage messages ---"
|
||||
RESULT=$(run_app_cmd purge_remote_media 2>&1) || true
|
||||
check "purge_remote_media shows usage" "$RESULT" "Usage"
|
||||
|
||||
RESULT=$(run_app_cmd purge_room 2>&1) || true
|
||||
check "purge_room shows usage" "$RESULT" "Usage"
|
||||
|
||||
RESULT=$(run_app_cmd purge_history 2>&1) || true
|
||||
check "purge_history shows usage" "$RESULT" "Usage"
|
||||
|
||||
RESULT=$(run_app_cmd purge_empty_rooms 2>&1) || true
|
||||
check "purge_empty_rooms shows usage" "$RESULT" "Usage"
|
||||
|
||||
RESULT=$(run_app_cmd get_token 2>&1) || true
|
||||
check "get_token shows usage" "$RESULT" "Usage"
|
||||
|
||||
RESULT=$(run_app_cmd register_admin 2>&1) || true
|
||||
check "register_admin shows usage" "$RESULT" "Usage"
|
||||
|
||||
echo ""
|
||||
echo "=== Results ==="
|
||||
echo "PASS: $PASS"
|
||||
echo "FAIL: $FAIL"
|
||||
if [ "$FAIL" -gt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user