MCPcopy Create free account
hub / github.com/compozy/agh / createIntegrationSession

Function createIntegrationSession

internal/cli/cli_integration_test.go:349–374  ·  view source on GitHub ↗
(t *testing.T, h integrationHarness, name string, workspace string)

Source from the content-addressed store, hash-verified

347}
348
349func createIntegrationSession(t *testing.T, h integrationHarness, name string, workspace string) SessionRecord {
350 t.Helper()
351
352 out := mustExecuteRoot(
353 t,
354 h.deps,
355 "session",
356 "new",
357 "--agent",
358 "coder",
359 "--name",
360 name,
361 "--workspace",
362 workspace,
363 "-o",
364 "json",
365 )
366 var created SessionRecord
367 if err := json.Unmarshal([]byte(out), &created); err != nil {
368 t.Fatalf("json.Unmarshal(session new) error = %v", err)
369 }
370 if created.ID == "" || created.State != session.StateActive {
371 t.Fatalf("created session = %#v, want active session with id", created)
372 }
373 return created
374}
375
376func assertPathExists(t *testing.T, path string) {
377 t.Helper()

Calls 1

mustExecuteRootFunction · 0.85

Tested by

no test coverage detected