MCPcopy
hub / github.com/hashicorp/go-getter / TestHgGetter_GetWithTimeout

Function TestHgGetter_GetWithTimeout

get_hg_test.go:212–232  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

210}
211
212func TestHgGetter_GetWithTimeout(t *testing.T) {
213 if !testHasHg {
214 t.Log("hg not found, skipping")
215 t.Skip()
216 }
217 ctx := context.Background()
218 g := &HgGetter{
219 Timeout: 1 * time.Millisecond,
220 }
221
222 dst := testing_helper.TempDir(t)
223 defer os.RemoveAll(filepath.Dir(dst))
224 req := &Request{
225 Dst: dst,
226 u: testModuleURL("basic-hg/foo.txt"),
227 }
228
229 if err := g.Get(ctx, req); err == nil {
230 t.Fatalf("err: %s", err.Error())
231 }
232}

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
testModuleURLFunction · 0.85
DirMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected