MCPcopy
hub / github.com/perkeep/perkeep / TestBlobFromURLPath

Function TestBlobFromURLPath

pkg/blobserver/gethandler/get_test.go:33–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31)
32
33func TestBlobFromURLPath(t *testing.T) {
34 br := blobFromURLPath("/foo/bar/camli/sha1-f1d2d2f924e986ac86fdf7b36c94bcdf32beec15")
35 if !br.Valid() {
36 t.Fatal("nothing found")
37 }
38 want := blob.MustParse("sha1-f1d2d2f924e986ac86fdf7b36c94bcdf32beec15")
39 if want != br {
40 t.Fatalf("got = %v; want %v", br, want)
41 }
42}
43
44func TestServeBlobRef_UTF8(t *testing.T) {
45 testServeBlobContents(t, "foo", "text/plain; charset=utf-8")

Callers

nothing calls this directly

Calls 5

MustParseFunction · 0.92
blobFromURLPathFunction · 0.85
FatalMethod · 0.80
FatalfMethod · 0.65
ValidMethod · 0.45

Tested by

no test coverage detected