Skip to content

Commit 294cf1c

Browse files
committed
Make MCP validation failures fail the test suite
- Add MCP_FAILS counter to track validation failures - Remove '|| true' that was suppressing validation failures - Increment MCP_FAILS when validate_mcp_metadata returns non-zero - Display MCP validation failures in test summary - Exit with non-zero code when MCP validations fail This ensures missing descriptions or other MCP metadata issues cause the GitHub Actions workflow to fail.
1 parent e98b2d9 commit 294cf1c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

modules/ai-agents/examples/test-mcp-examples.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TOTAL=0
2020
PASSED=0
2121
FAILED=0
2222
SKIPPED=0
23+
MCP_FAILS=0
2324

2425
echo "🧪 Redpanda Connect MCP Examples Test Suite (Cloud)"
2526
echo "===================================================="
@@ -88,7 +89,9 @@ for file in $PATTERN; do
8889
# Lint the config
8990
if lint_config "$file"; then
9091
# Validate MCP metadata
91-
validate_mcp_metadata "$file" || true
92+
if ! validate_mcp_metadata "$file"; then
93+
MCP_FAILS=$((MCP_FAILS + 1))
94+
fi
9295
fi
9396
fi
9497
done
@@ -101,12 +104,16 @@ echo "===================================================="
101104
echo "Total configs tested: $TOTAL"
102105
echo -e "Passed: ${GREEN}$PASSED${NC}"
103106
echo -e "Failed: ${RED}$FAILED${NC}"
107+
if [[ $MCP_FAILS -gt 0 ]]; then
108+
echo -e "MCP validation failures: ${RED}$MCP_FAILS${NC}"
109+
fi
104110
if [[ $SKIPPED -gt 0 ]]; then
105111
echo -e "Skipped: ${YELLOW}$SKIPPED${NC}"
106112
fi
107113
echo ""
108114

109-
if [[ $FAILED -gt 0 ]]; then
115+
TOTAL_FAILURES=$((FAILED + MCP_FAILS))
116+
if [[ $TOTAL_FAILURES -gt 0 ]]; then
110117
echo -e "${RED}❌ Some tests failed${NC}"
111118
exit 1
112119
else

0 commit comments

Comments
 (0)