mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-30 08:50:01 -06:00
/integration-tests/bats/sql-server-mcp.bats: remove broken test
This commit is contained in:
@@ -63,36 +63,6 @@ wait_for_mcp_port() {
|
||||
[ $status -eq 0 ]
|
||||
}
|
||||
|
||||
@test "sql-server-mcp: --mcp-user authenticates as specified sql user" {
|
||||
cd repo1
|
||||
|
||||
# TODO: this is currently broken in bats for some reason,
|
||||
# need to figure out why
|
||||
# Create a sql user with no password and read privileges
|
||||
# dolt sql -q "CREATE USER mcpuser@'%'"
|
||||
# dolt sql -q "GRANT ALL PRIVILEGES ON *.* TO mcpuser@'%'"
|
||||
|
||||
MCP_PORT=$( definePORT )
|
||||
start_sql_server_with_args --host 0.0.0.0 --mcp-port "$MCP_PORT" --mcp-user root
|
||||
run wait_for_mcp_port "$MCP_PORT" 8500
|
||||
[ $status -eq 0 ]
|
||||
|
||||
# initialize and list via MCP
|
||||
INIT_FILE=$BATS_TMPDIR/mcp_init_mu_$$.json
|
||||
OUT_INIT=$BATS_TMPDIR/mcp_out_init_mu_$$.json
|
||||
echo '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"clientInfo":{"name":"bats","version":"0.0.0"},"capabilities":{}}}' > "$INIT_FILE"
|
||||
run bash -c "curl -sS -D $BATS_TMPDIR/mcp_headers_mu_$$.txt -H 'Content-Type: application/json' --data-binary @'$INIT_FILE' http://127.0.0.1:${MCP_PORT}/ > '$OUT_INIT'"
|
||||
[ $status -eq 0 ]
|
||||
SESSION=$(grep -i '^Mcp-Session-Id:' $BATS_TMPDIR/mcp_headers_mu_$$.txt | awk -F': ' '{print $2}' | tr -d '\r')
|
||||
[ -n "$SESSION" ]
|
||||
|
||||
CALL_FILE=$BATS_TMPDIR/mcp_call_mu_$$.json
|
||||
OUT_CALL=$BATS_TMPDIR/mcp_out_call_mu_$$.json
|
||||
echo '{"jsonrpc":"2.0","id":"2","method":"tools/call","params":{"name":"list_databases","arguments":{}}}' > "$CALL_FILE"
|
||||
run bash -c "curl -sS -H 'Content-Type: application/json' -H 'Mcp-Session-Id: '$SESSION --data-binary @'$CALL_FILE' http://127.0.0.1:${MCP_PORT}/ > '$OUT_CALL'"
|
||||
[ $status -eq 0 ]
|
||||
}
|
||||
|
||||
@test "sql-server-mcp: starts MCP HTTP server on --mcp-port and serves alongside SQL" {
|
||||
cd repo1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user