feat: restore learning feedback and knowledge capabilities
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
SCRIPT="$ROOT_DIR/scripts/provision-knowledge-platform.sh"
|
||||
|
||||
if "$SCRIPT" --silver-tenant-id 000000 --dry-run >/dev/null 2>&1; then
|
||||
echo "missing meitu tenant must fail" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTPUT="$($SCRIPT --silver-tenant-id 000000 --meitu-tenant-id 100001 --dry-run)"
|
||||
|
||||
[[ "$(grep -c '^\[SPACE\]' <<<"$OUTPUT")" -eq 4 ]]
|
||||
[[ "$(grep -c '^\[APP\]' <<<"$OUTPUT")" -eq 3 ]]
|
||||
grep -q 'yc_admin -> yc_public_policy,yc_property_sop,yc_management_ops' <<<"$OUTPUT"
|
||||
grep -q 'yc_mobile -> yc_public_policy,yc_property_sop,yc_management_ops' <<<"$OUTPUT"
|
||||
grep -q 'mt_card_miniapp -> mt_customer_service' <<<"$OUTPUT"
|
||||
grep -q 'code=mt_card_miniapp auth=API_TOKEN status=DISABLED' <<<"$OUTPUT"
|
||||
if grep -Eq 'root/root|ak_[a-z0-9_]+_|token_hash' <<<"$OUTPUT"; then
|
||||
echo "dry-run leaked a credential or secret field" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "provision knowledge platform contract passed"
|
||||
Reference in New Issue
Block a user