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

Function TestHttpGetter_none

get_http_test.go:242–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

240}
241
242func 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
267func TestHttpGetter_resume(t *testing.T) {
268 load := []byte(testHttpMetaStr)

Callers

nothing calls this directly

Calls 4

testHttpServerFunction · 0.85
GetMethod · 0.65
CloseMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected