depleted_calendar_test.go 604 B

1234567891011121314151617
  1. package service
  2. import (
  3. "strings"
  4. "testing"
  5. )
  6. // A calendar client has reset = 0, so the old predicate called it depleted at all
  7. // times and the operator's purge deleted it along with its traffic row (#6239).
  8. func TestDepletedClauseExcludesCalendarClients(t *testing.T) {
  9. if !strings.Contains(depletedClientsClause, "reset_day = 0") {
  10. t.Fatalf("predicate ignores reset_day, so a calendar client would be purged: %q", depletedClientsClause)
  11. }
  12. if !strings.Contains(depletedClientsClause, "reset = 0") {
  13. t.Fatalf("predicate no longer protects interval clients: %q", depletedClientsClause)
  14. }
  15. }