MCPcopy Create free account
hub / github.com/docker/docker-agent / TestModelsListCommand_NoCredentials

Function TestModelsListCommand_NoCredentials

cmd/root/models_test.go:321–335  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

319}
320
321func TestModelsListCommand_NoCredentials(t *testing.T) {
322 t.Parallel()
323
324 // No provider keys — only DMR should remain as fallback.
325 var buf bytes.Buffer
326 cmd := newModelsCmd(withTestConfig(map[string]string{}))
327 cmd.SetOut(&buf)
328 cmd.SetErr(&buf)
329 cmd.SetArgs(nil)
330
331 require.NoError(t, cmd.Execute())
332
333 // DMR is always available as fallback
334 assert.Contains(t, buf.String(), "dmr")
335}

Callers

nothing calls this directly

Calls 4

StringMethod · 0.95
newModelsCmdFunction · 0.85
withTestConfigFunction · 0.85
ExecuteMethod · 0.45

Tested by

no test coverage detected