Skip to content

Commit 31aa1f3

Browse files
author
razvan
committed
test(indexer): fix TestIndexStatusRoundTrip — Changed is json:"-" and not persisted
1 parent 7911809 commit 31aa1f3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pkg/indexer/index_status_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ func TestIndexStatusRoundTrip(t *testing.T) {
1616
StartedAt: "2025-01-01T00:00:00Z",
1717
Elapsed: "5s",
1818
Languages: map[string]LangStatus{
19-
"go": {OnDisk: 100, Changed: 10, Processed: 5},
19+
// Changed is json:"-" (internal-only field) and is not persisted.
20+
"go": {OnDisk: 100, Processed: 5},
2021
},
2122
}
2223

@@ -29,9 +30,6 @@ func TestIndexStatusRoundTrip(t *testing.T) {
2930
if loaded.Languages["go"].OnDisk != 100 {
3031
t.Errorf("OnDisk: got %d, want 100", loaded.Languages["go"].OnDisk)
3132
}
32-
if loaded.Languages["go"].Changed != 10 {
33-
t.Errorf("Changed: got %d, want 10", loaded.Languages["go"].Changed)
34-
}
3533
if loaded.Languages["go"].Processed != 5 {
3634
t.Errorf("Processed: got %d, want 5", loaded.Languages["go"].Processed)
3735
}

0 commit comments

Comments
 (0)