MCPcopy
hub / github.com/benbjohnson/litestream / TestPosV3_String

Function TestPosV3_String

v3_test.go:18–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func TestPosV3_String(t *testing.T) {
19 tests := []struct {
20 pos litestream.PosV3
21 want string
22 }{
23 {litestream.PosV3{}, ""},
24 {litestream.PosV3{Generation: "0123456789abcdef", Index: 1, Offset: 4096}, "0123456789abcdef/00000001:0000000000001000"},
25 }
26 for _, tt := range tests {
27 if got := tt.pos.String(); got != tt.want {
28 t.Errorf("PosV3%+v.String() = %q, want %q", tt.pos, got, tt.want)
29 }
30 }
31}
32
33func TestSnapshotInfoV3_Pos(t *testing.T) {
34 info := litestream.SnapshotInfoV3{Generation: "abc", Index: 5}

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected