@@ -1718,7 +1718,7 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
17181718 Name : "Reuse pending authz" ,
17191719 RegistrationID : Registration .Id ,
17201720 Identifier : identifier .NewDNS (pending ),
1721- ExpectReuse : true , // TODO(#7715): Invert this.
1721+ ExpectReuse : false ,
17221722 },
17231723 {
17241724 Name : "Reuse valid authz" ,
@@ -1766,40 +1766,6 @@ func TestNewOrder_AuthzReuse(t *testing.T) {
17661766 }
17671767}
17681768
1769- // TestNewOrder_AuthzReuse_NoPending tests that authz reuse doesn't reuse
1770- // pending authzs when a feature flag is set.
1771- // This is not simply a test case in TestNewOrder_OrderReuse because it relies
1772- // on feature-flag gated behavior. It should be unified with that function when
1773- // the feature flag is removed.
1774- func TestNewOrder_AuthzReuse_NoPending (t * testing.T ) {
1775- // TODO(#7715): Integrate these cases into TestNewOrder_AuthzReuse.
1776- _ , _ , ra , _ , _ , cleanUp := initAuthorities (t )
1777- defer cleanUp ()
1778-
1779- features .Set (features.Config {NoPendingAuthzReuse : true })
1780- defer features .Reset ()
1781-
1782- // Create an initial order and two pending authzs.
1783- extant , err := ra .NewOrder (context .Background (), & rapb.NewOrderRequest {
1784- RegistrationID : Registration .Id ,
1785- Identifiers : []* corepb.Identifier {
1786- identifier .NewDNS ("a.com" ).ToProto (),
1787- identifier .NewDNS ("b.com" ).ToProto (),
1788- },
1789- })
1790- test .AssertNotError (t , err , "creating test order" )
1791-
1792- // With the feature flag enabled, creating a new order for one of these names
1793- // should not reuse the existing pending authz.
1794- new , err := ra .NewOrder (context .Background (), & rapb.NewOrderRequest {
1795- RegistrationID : Registration .Id ,
1796- Identifiers : []* corepb.Identifier {identifier .NewDNS ("a.com" ).ToProto ()},
1797- })
1798- test .AssertNotError (t , err , "creating test order" )
1799- test .AssertNotEquals (t , new .Id , extant .Id )
1800- test .AssertNotEquals (t , new .V2Authorizations [0 ], extant .V2Authorizations [0 ])
1801- }
1802-
18031769func TestNewOrder_ValidationProfiles (t * testing.T ) {
18041770 _ , _ , ra , _ , _ , cleanUp := initAuthorities (t )
18051771 defer cleanUp ()
@@ -2012,7 +1978,7 @@ func TestNewOrder_ProfileIdentifierTypes(t *testing.T) {
20121978 }
20131979}
20141980
2015- // mockSAWithAuthzs has a GetAuthorizations2 method that returns the protobuf
1981+ // mockSAWithAuthzs has a GetValidAuthorizations2 method that returns the protobuf
20161982// version of its authzs struct member. It also has a fake GetOrderForNames
20171983// which always fails, and a fake NewOrderAndAuthzs which always succeeds, to
20181984// facilitate the full execution of RA.NewOrder.
@@ -2043,14 +2009,6 @@ func (msa *mockSAWithAuthzs) GetValidAuthorizations2(ctx context.Context, req *s
20432009 return resp , nil
20442010}
20452011
2046- func (msa * mockSAWithAuthzs ) GetAuthorizations2 (ctx context.Context , req * sapb.GetAuthorizationsRequest , _ ... grpc.CallOption ) (* sapb.Authorizations , error ) {
2047- return msa .GetValidAuthorizations2 (ctx , & sapb.GetValidAuthorizationsRequest {
2048- RegistrationID : req .RegistrationID ,
2049- Identifiers : req .Identifiers ,
2050- ValidUntil : req .ValidUntil ,
2051- })
2052- }
2053-
20542012func (msa * mockSAWithAuthzs ) GetAuthorization2 (ctx context.Context , req * sapb.AuthorizationID2 , _ ... grpc.CallOption ) (* corepb.Authorization , error ) {
20552013 for _ , authz := range msa .authzs {
20562014 if authz .ID == fmt .Sprintf ("%d" , req .Id ) {
0 commit comments