feat(shangwutong): sync classifications and update conversations

This commit is contained in:
2026-09-11 17:08:18 +08:00
parent a06d4f4199
commit 31f157a4f5
28 changed files with 2541 additions and 232 deletions
+5 -5
View File
@@ -12,7 +12,7 @@ cp "$tmp/external-db-client.crt" "$tmp/external-db-ca.crt"
chmod 0644 "$tmp/external-db-ca.crt" "$tmp/external-db-client.crt"
chmod 0640 "$tmp/external-db-client.key"
cat > "$tmp/bin/findmnt" <<'EOF'
cat >"$tmp/bin/findmnt" <<'EOF'
#!/usr/bin/env bash
if [[ $1 == -M && $2 == "$GOCHAT_BACKUP_OFFSITE_DIR" ]]; then
printf '%s %s %s\n' "$TEST_OFFSITE_SOURCE" "$TEST_OFFSITE_FSTYPE" "$TEST_OFFSITE_DEVICE"
@@ -22,7 +22,7 @@ else
exit 1
fi
EOF
cat > "$tmp/bin/docker" <<'EOF'
cat >"$tmp/bin/docker" <<'EOF'
#!/usr/bin/env bash
if [[ -n ${TEST_MUTABLE_IMAGE:-} ]]; then
echo 'pgvector/pgvector:pg16'
@@ -55,7 +55,7 @@ export TEST_LOCAL_SOURCE=/dev/sda1
export TEST_LOCAL_DEVICE=8:1
run_preflight() {
"$root/deploy/docker/preflight.sh" > "$tmp/output" 2>&1
"$root/deploy/docker/preflight.sh" >"$tmp/output" 2>&1
}
expect_failure() {
@@ -101,7 +101,7 @@ printf '%s\n' 'https://alerts.example.test/gochat' >"$ALERTMANAGER_WEBHOOK_URL_F
TEST_MUTABLE_IMAGE=1
export TEST_MUTABLE_IMAGE
expect_failure 'a mutable production image' 'must be pinned to a sha256 digest'
"$root/deploy/docker/preflight.sh" --allow-local-images > "$tmp/output" 2>&1
"$root/deploy/docker/preflight.sh" --allow-local-images >"$tmp/output" 2>&1
grep -F 'production preflight passed' "$tmp/output" >/dev/null
unset TEST_MUTABLE_IMAGE
@@ -116,7 +116,7 @@ GOCHAT_DATABASE_DSN='postgres://external_user:external_password@db.example.test:
expect_failure 'duplicate allowed sslmode parameters' 'must contain exactly one sslmode'
while IFS='|' read -r name GOCHAT_DATABASE_DSN; do
expect_failure "$name" 'must use an external PostgreSQL host'
done < "$root/deploy/docker/database_host_rejection_cases.txt"
done <"$root/deploy/docker/database_host_rejection_cases.txt"
GOCHAT_DATABASE_DSN='postgres://external_user:external_password@db.example.test:5432/gochat?sslmode=verify-full&sslrootcert=/tmp/ca.crt&sslcert=/run/secrets/external-db-client.crt&sslkey=/run/secrets/external-db-client.key'
expect_failure 'a non-fixed certificate path' 'sslrootcert must use /run/secrets/external-db-ca.crt'