MCPcopy Index your code
hub / github.com/docker/docker-agent / TestNewSession_AllOptionsApplied

Function TestNewSession_AllOptionsApplied

pkg/session/session_options_test.go:25–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23}
24
25func TestNewSession_AllOptionsApplied(t *testing.T) {
26 t.Parallel()
27 s := New(
28 WithMaxIterations(10),
29 WithToolsApproved(true),
30 WithHideToolResults(true),
31 WithWorkingDir("/work"),
32 )
33
34 assert.Equal(t, 10, s.MaxIterations)
35 assert.True(t, s.ToolsApproved)
36 assert.True(t, s.HideToolResults)
37 assert.Equal(t, "/work", s.WorkingDir)
38 assert.Equal(t, []string{"/work"}, s.AllowedDirectories())
39}
40
41// TestNewSession_ConsistencyBetweenInitialAndSpawned verifies that the
42// initial session and spawned sessions receive the same set of options.

Callers

nothing calls this directly

Calls 6

WithToolsApprovedFunction · 0.85
WithHideToolResultsFunction · 0.85
AllowedDirectoriesMethod · 0.80
NewFunction · 0.70
WithMaxIterationsFunction · 0.70
WithWorkingDirFunction · 0.70

Tested by

no test coverage detected