MCPcopy Create free account
hub / github.com/52funny/pikpakcli / TestRunRequiresUsername

Function TestRunRequiresUsername

cli/setup/setup_test.go:108–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

106}
107
108func TestRunRequiresUsername(t *testing.T) {
109 targetPath := filepath.Join(t.TempDir(), "config.yml")
110
111 _, err := Run(Options{
112 TargetPath: targetPath,
113 Prompts: &fakePrompts{
114 lines: []string{" ", "", ""},
115 password: "secret",
116 },
117 })
118 require.Error(t, err)
119 assert.Contains(t, err.Error(), "username is required")
120 assert.NoFileExists(t, targetPath)
121}
122
123func TestRunRequiresPassword(t *testing.T) {
124 targetPath := filepath.Join(t.TempDir(), "config.yml")

Callers

nothing calls this directly

Calls 2

RunFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected