(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestStatsTracker_ZeroDeltaSkipping(t *testing.T) { |
| 162 | tracker := New() |
| 163 | ctx := context.Background() |
| 164 | |
| 165 | // Initial usage |
| 166 | updateSample(tracker, "key1", "user@example.com", 1000, 2000, "1.2.3.4") |
| 167 | |
| 168 | // Reset |
| 169 | tracker.GetStats(ctx, []string{"key1"}, true) |
| 170 | |
| 171 | // No change |
| 172 | resp := tracker.GetStats(ctx, []string{"key1"}, false) |
| 173 | if len(resp.Stats) != 0 { |
| 174 | t.Errorf("Expected 0 stats for zero delta, got %d", len(resp.Stats)) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func TestStatsTracker_RemoveStatsStoresPendingLastDelta(t *testing.T) { |
| 179 | tracker := New() |
nothing calls this directly
no test coverage detected