diff --git a/wfe2/wfe_test.go b/wfe2/wfe_test.go index 04aac18ac8b..10a435fa498 100644 --- a/wfe2/wfe_test.go +++ b/wfe2/wfe_test.go @@ -3863,13 +3863,17 @@ func Test_sendErrorInternalServerError(t *testing.T) { // mockSAForARI provides a mock SA with the methods required for an issuance and // a renewal with the ARI `Replaces` field. +// +// Note that FQDNSetTimestampsForWindow always return an empty list, which allows us to act +// as if a certificate is not getting the renewal exemption, even when we are repeatedly +// issuing for the same names. type mockSAForARI struct { sapb.StorageAuthorityReadOnlyClient cert *corepb.Certificate } -func (sa *mockSAForARI) FQDNSetExists(ctx context.Context, in *sapb.FQDNSetExistsRequest, opts ...grpc.CallOption) (*sapb.Exists, error) { - return &sapb.Exists{Exists: false}, nil +func (sa *mockSAForARI) FQDNSetTimestampsForWindow(ctx context.Context, in *sapb.CountFQDNSetsRequest, opts ...grpc.CallOption) (*sapb.Timestamps, error) { + return &sapb.Timestamps{Timestamps: nil}, nil } // GetCertificate returns the inner certificate if it matches the given serial. @@ -4170,6 +4174,9 @@ func TestNewOrderRateLimits(t *testing.T) { `{"Identifiers": [{"type": "dns", "value": "example.com"}]}`) responseWriter = httptest.NewRecorder() mux.ServeHTTP(responseWriter, r) + features.Set(features.Config{ + UseKvLimitsForNewOrder: true, + }) test.AssertEquals(t, responseWriter.Code, http.StatusTooManyRequests) // Make a request with the "Replaces" field, which should satisfy ARI checks