(t *testing.T)
| 210 | } |
| 211 | |
| 212 | func 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 | } |
nothing calls this directly
no test coverage detected