Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed Nov 19, 2024
1 parent af8753c commit 23deea7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions automod/engine/circuit_breaker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestTakedownCircuitBreaker(t *testing.T) {
p1cbor := p1buf.Bytes()

// generate double the quote of events; expect to only count the quote worth of actions
for i := 0; i < 2*QuotaModTakedownDay; i++ {
for i := 0; i < 2*eng.Config.QuotaModTakedownDay; i++ {
ident := identity.Identity{
DID: syntax.DID(fmt.Sprintf("did:plc:abc%d", i)),
Handle: syntax.Handle("handle.example.com"),
Expand All @@ -63,7 +63,7 @@ func TestTakedownCircuitBreaker(t *testing.T) {

takedowns, err := eng.Counters.GetCount(ctx, "automod-quota", "takedown", countstore.PeriodDay)
assert.NoError(err)
assert.Equal(QuotaModTakedownDay, takedowns)
assert.Equal(eng.Config.QuotaModTakedownDay, takedowns)

reports, err := eng.Counters.GetCount(ctx, "automod-quota", "report", countstore.PeriodDay)
assert.NoError(err)
Expand All @@ -89,7 +89,7 @@ func TestReportCircuitBreaker(t *testing.T) {
p1cbor := p1buf.Bytes()

// generate double the quota of events; expect to only count the quota worth of actions
for i := 0; i < 2*QuotaModReportDay; i++ {
for i := 0; i < 2*eng.Config.QuotaModReportDay; i++ {
ident := identity.Identity{
DID: syntax.DID(fmt.Sprintf("did:plc:abc%d", i)),
Handle: syntax.Handle("handle.example.com"),
Expand All @@ -112,5 +112,5 @@ func TestReportCircuitBreaker(t *testing.T) {

reports, err := eng.Counters.GetCount(ctx, "automod-quota", "report", countstore.PeriodDay)
assert.NoError(err)
assert.Equal(QuotaModReportDay, reports)
assert.Equal(eng.Config.QuotaModReportDay, reports)
}

0 comments on commit 23deea7

Please sign in to comment.