MCPcopy
hub / github.com/grafana/tempo / TestFullFilename

Function TestFullFilename

tempodb/encoding/vparquet4/wal_block_test.go:30–60  ·  view source on GitHub ↗

Note: Standard wal block functionality (appending, searching, finding, etc.) is tested with all other wal blocks in /tempodb/wal/wal_test.go

(t *testing.T)

Source from the content-addressed store, hash-verified

28// in /tempodb/wal/wal_test.go
29
30func TestFullFilename(t *testing.T) {
31 tests := []struct {
32 name string
33 b *walBlock
34 expected string
35 }{
36 {
37 name: "basic",
38 b: &walBlock{
39 meta: backend.NewBlockMeta("foo", uuid.MustParse("123e4567-e89b-12d3-a456-426614174000"), VersionString),
40 path: "/blerg",
41 },
42 expected: "/blerg/123e4567-e89b-12d3-a456-426614174000+foo+vParquet4",
43 },
44 {
45 name: "no path",
46 b: &walBlock{
47 meta: backend.NewBlockMeta("foo", uuid.MustParse("123e4567-e89b-12d3-a456-426614174000"), VersionString),
48 path: "",
49 },
50 expected: "123e4567-e89b-12d3-a456-426614174000+foo+vParquet4",
51 },
52 }
53
54 for _, tc := range tests {
55 t.Run(tc.name, func(t *testing.T) {
56 actual := tc.b.walPath()
57 assert.Equal(t, tc.expected, actual)
58 })
59 }
60}
61
62// TestPartialReplay verifies that we can best-effort replay a partial/corrupted WAL block.
63// This test works by flushing a WAL block across a few pages, corrupting one, and then replaying

Callers

nothing calls this directly

Calls 4

NewBlockMetaFunction · 0.92
RunMethod · 0.45
walPathMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected