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

Function TestIsAskpassInvocation

cmd/root/askpass_test.go:11–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestIsAskpassInvocation(t *testing.T) {
12 t.Parallel()
13
14 assert.True(t, isAskpassInvocation([]string{shell.AskpassCommandName}))
15 assert.True(t, isAskpassInvocation([]string{shell.AskpassCommandName, "--", "[sudo] password:"}))
16 assert.False(t, isAskpassInvocation(nil))
17 assert.False(t, isAskpassInvocation([]string{"run"}))
18 assert.False(t, isAskpassInvocation([]string{"run", shell.AskpassCommandName}))
19}
20
21func TestAskpassIsManagementInvocation(t *testing.T) {
22 t.Parallel()

Callers

nothing calls this directly

Calls 1

isAskpassInvocationFunction · 0.85

Tested by

no test coverage detected