MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestGetInfo

Function TestGetInfo

internal/httpapi/operations_test.go:469–492  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

467}
468
469func TestGetInfo(t *testing.T) {
470 srv := testServer(t)
471 resp, err := http.Get(srv.URL + "/v1/info")
472 if err != nil {
473 t.Fatal(err)
474 }
475 defer resp.Body.Close()
476 if resp.StatusCode != 200 {
477 t.Fatalf("status: %d", resp.StatusCode)
478 }
479 if resp.Header.Get("X-Request-Id") == "" {
480 t.Error("missing X-Request-Id header")
481 }
482 if resp.Header.Get("X-Content-Type-Options") != "nosniff" {
483 t.Error("missing nosniff header")
484 }
485 var body DeploymentInfoView
486 if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
487 t.Fatal(err)
488 }
489 if body.SharedDomain != "agents.e2a.dev" || !body.SlugRegistrationEnabled || body.PublicURL != "https://api.e2a.dev" {
490 t.Fatalf("unexpected info: %+v", body)
491 }
492}
493
494func TestListAgentsAuthorized(t *testing.T) {
495 srv := testServer(t)

Callers

nothing calls this directly

Calls 4

testServerFunction · 0.85
GetMethod · 0.65
CloseMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected