Files
crank/docs/public-smoke-targets.md
T
github-ops 0af60b1693
CI / Rust Checks (push) Failing after 2m6s
CI / UI Checks (push) Has been skipped
CI / Frontend E2E (push) Has been skipped
CI / Deployment Manifests (push) Has been skipped
Deploy / deploy (push) Successful in 2m26s
Remove enterprise leftovers from community
2026-06-20 12:04:46 +00:00

100 lines
2.7 KiB
Markdown

# Public Smoke Targets
Этот документ фиксирует публичный upstream-сервис, который можно использовать для ручной проверки `REST` operation в `crank-community` без поднятия своего тестового backend-а.
Для Community канонический smoke target только один:
- `REST`
Все примеры ниже дублируются готовыми payload-файлами в [examples/mcp-smoke](../examples/mcp-smoke).
## 1. Источник
- REST: Open-Meteo Weather Forecast API
`https://open-meteo.com/en/docs`
## 2. Готовые operation payload-ы
- REST: [rest-open-meteo.operation.json](../examples/mcp-smoke/rest-open-meteo.operation.json)
- REST test input: [rest-open-meteo.test-input.json](../examples/mcp-smoke/rest-open-meteo.test-input.json)
## 3. Как использовать
### 3.1. Через UI
1. Создать operation вручную в `Wizard`.
2. Подставить значения из `rest-open-meteo.operation.json`.
3. На шаге теста использовать `rest-open-meteo.test-input.json`.
### 3.2. Через admin-api
Пример для `ws_default`:
```bash
curl -sS -X POST \
https://rmcp.itexp.me/api/admin/workspaces/ws_default/operations \
-H 'content-type: application/json' \
-b cookie.txt \
--data @examples/mcp-smoke/rest-open-meteo.operation.json
```
Потом test-run:
```bash
curl -sS -X POST \
https://rmcp.itexp.me/api/admin/workspaces/ws_default/operations/<operation_id>/test-runs \
-H 'content-type: application/json' \
-b cookie.txt \
--data '{
"version": 1,
"input": '"$(cat examples/mcp-smoke/rest-open-meteo.test-input.json)"'
}'
```
Логин перед этим:
```bash
curl -sS -c cookie.txt \
-H 'content-type: application/json' \
-X POST https://rmcp.itexp.me/api/auth/login \
--data '{"email":"<your-email>","password":"<your-password>"}'
```
## 4. Что именно проверяет пример
### 4.1. REST: Open-Meteo
- Protocol: `REST`
- Endpoint: `https://api.open-meteo.com/v1/forecast`
- Проверка:
- query mapping
- fixed query defaults
- JSON response extraction
Ожидаемый upstream response shape:
```json
{
"timezone": "Europe/Moscow",
"current": {
"time": "2026-04-05T22:30",
"temperature_2m": 3.4,
"wind_speed_10m": 8.3
}
}
```
## 5. Практическая рекомендация
Для первого smoke pass использовать operation:
- `weather_current_open_meteo`
Этого достаточно, чтобы проверить весь путь:
- create operation
- test-run
- publish
- bind to agent
- MCP call через `workspace + agent`