(t *testing.T)
| 240 | } |
| 241 | |
| 242 | func TestHttpGetter_none(t *testing.T) { |
| 243 | ln := testHttpServer(t) |
| 244 | defer ln.Close() |
| 245 | ctx := context.Background() |
| 246 | |
| 247 | g := new(HttpGetter) |
| 248 | dst := testing_helper.TempDir(t) |
| 249 | defer os.RemoveAll(dst) |
| 250 | |
| 251 | var u url.URL |
| 252 | u.Scheme = "http" |
| 253 | u.Host = ln.Addr().String() |
| 254 | u.Path = "/none" |
| 255 | |
| 256 | req := &Request{ |
| 257 | Dst: dst, |
| 258 | u: &u, |
| 259 | } |
| 260 | |
| 261 | // Get it! |
| 262 | if err := g.Get(ctx, req); err == nil { |
| 263 | t.Fatal("should error") |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | func TestHttpGetter_resume(t *testing.T) { |
| 268 | load := []byte(testHttpMetaStr) |
nothing calls this directly
no test coverage detected