mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 00:04:54 +00:00
test: update snapshots and test gating
This commit is contained in:
parent
08c7723c26
commit
308d7f279c
14 changed files with 181 additions and 5 deletions
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: snapshot_status(status)
|
||||
---
|
||||
status: 204
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: normalize_agent_modes(&modes)
|
||||
---
|
||||
modes:
|
||||
- description: true
|
||||
id: build
|
||||
name: Build
|
||||
- description: true
|
||||
id: plan
|
||||
name: Plan
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: normalize_agent_list(&agents)
|
||||
---
|
||||
agents:
|
||||
- id: amp
|
||||
- id: claude
|
||||
- id: codex
|
||||
- id: mock
|
||||
- id: opencode
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: normalize_health(&health)
|
||||
---
|
||||
status: ok
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "json!({ \"status\": status.as_u16(), \"payload\": normalize_health(&payload), })"
|
||||
---
|
||||
payload:
|
||||
status: ok
|
||||
status: 200
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "json!({ \"status\": status.as_u16(), \"payload\": payload, })"
|
||||
---
|
||||
payload:
|
||||
detail: token invalid
|
||||
details:
|
||||
message: missing or invalid token
|
||||
status: 401
|
||||
title: Token Invalid
|
||||
type: "urn:sandbox-agent:error:token_invalid"
|
||||
status: 401
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "json!({ \"status\": status.as_u16(), \"payload\": payload, })"
|
||||
---
|
||||
payload:
|
||||
detail: token invalid
|
||||
details:
|
||||
message: missing or invalid token
|
||||
status: 401
|
||||
title: Token Invalid
|
||||
type: "urn:sandbox-agent:error:token_invalid"
|
||||
status: 401
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "json!({\n \"status\": status.as_u16(), \"payload\": normalize_agent_list(&payload),\n})"
|
||||
---
|
||||
payload:
|
||||
agents:
|
||||
- id: amp
|
||||
- id: claude
|
||||
- id: codex
|
||||
- id: mock
|
||||
- id: opencode
|
||||
status: 200
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "json!({\n \"cors\": snapshot_cors(status, &headers), \"payload\":\n normalize_health(&payload),\n})"
|
||||
---
|
||||
cors:
|
||||
access-control-allow-origin: "http://example.com"
|
||||
status: 200
|
||||
vary: "origin, access-control-request-method, access-control-request-headers"
|
||||
payload:
|
||||
status: ok
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
source: server/packages/sandbox-agent/tests/http/agent_endpoints.rs
|
||||
expression: "snapshot_cors(status, &headers)"
|
||||
---
|
||||
access-control-allow-headers: "content-type,authorization"
|
||||
access-control-allow-methods: "GET,POST"
|
||||
access-control-allow-origin: "http://example.com"
|
||||
status: 200
|
||||
vary: "origin, access-control-request-method, access-control-request-headers"
|
||||
|
|
@ -1 +1,2 @@
|
|||
#[cfg(feature = "test-utils")]
|
||||
mod agent_server_manager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue