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

Function TestRunRejectsInvalidProxy

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

Source from the content-addressed store, hash-verified

136}
137
138func TestRunRejectsInvalidProxy(t *testing.T) {
139 targetPath := filepath.Join(t.TempDir(), "config.yml")
140
141 _, err := Run(Options{
142 TargetPath: targetPath,
143 Prompts: &fakePrompts{
144 lines: []string{"user@example.com", "127.0.0.1:7890", ""},
145 password: "secret",
146 },
147 })
148 require.Error(t, err)
149 assert.Contains(t, err.Error(), "proxy should contains ://")
150 assert.NoFileExists(t, targetPath)
151}
152
153func TestConfigTemplateIsLoaded(t *testing.T) {
154 assert.Contains(t, string(configTemplate), "username: xxx")

Callers

nothing calls this directly

Calls 2

RunFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected