fix checkpoint comparison test store refs · Entire

fix checkpoint comparison test store refs

d2c8f3b ·

peyton-alt · 3w ago · 1 file · +7 added/-7 removed

Sessions

abbcd842b704 View transcript

Changes

1

1871 unmodified lines

1872
1873
1874
1875
1875
1876
1877
1878
68 unmodified lines

1947
1948
1949
1950
1950
1951
1952
1953
77 unmodified lines

2031
2032
2033
2034
2034
2035
2036
2037
35 unmodified lines

2073
2074
2075
2076
2076
2077
2078
2079
33 unmodified lines

2113
2114
2115
2116
2116
2117
2118
2119
34 unmodified lines

2154
2155
2156
2157
2157
2158
2159
2160
41 unmodified lines

2202
2203
2204
2205
2205
2206
2207
2208

1871 unmodified lines

func TestCheckpointTokensCmd_TextOutputWithComparison(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("aaa111bbb222")
    currentID := id.MustCheckpointID("bbb222ccc333")

68 unmodified lines

func TestCheckpointTokensCmd_JSONOutputWithComparison(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("abc111abc111")
    currentID := id.MustCheckpointID("abc222abc222")

77 unmodified lines

func TestCheckpointTokensCmd_ComparisonNoChange(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("111aaa222bbb")
    currentID := id.MustCheckpointID("222bbb333ccc")

35 unmodified lines

func TestCheckpointTokensCmd_ComparisonUnavailableWhenBaselineTokenDataMissing(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("333ccc444ddd")
    currentID := id.MustCheckpointID("444ddd555eee")

33 unmodified lines

func TestCheckpointTokensCmd_JSONComparisonUnavailableWhenCurrentTokenDataMissing(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("555eee666fff")
    currentID := id.MustCheckpointID("666fff777aaa")

34 unmodified lines

func TestCheckpointTokensCmd_ComparisonUsesMultiSessionAggregates(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("777aaa888bbb")
    currentID := id.MustCheckpointID("888bbb999ccc")

41 unmodified lines

func TestCheckpointTokensCmd_ComparisonOmitsPercentWhenBaselineMetricIsZero(t *testing.T) {
    repo, _ := runExplainAutoTestRepo(t)
    ctx := context.Background()
    store := checkpoint.NewGitStore(repo)
    store := checkpoint.NewGitStore(repo, checkpoint.DefaultV1Refs())
    baselineID := id.MustCheckpointID("999ccc000aaa")
    currentID := id.MustCheckpointID("000aaa111bbb")

Mcmd/entire/cli/sessions_test.go +7/-7