@@ -1078,49 +1078,6 @@ func TestRevokeCertificate(t *testing.T) {
10781078 require .Error (t , err )
10791079 require .ErrorContains (t , err , fmt .Sprintf ("failed to find CA account %q" , revReq .CertificateAuthorityAccountName ))
10801080 })
1081- t .Run ("failed-unsupported ca type" , func (t * testing.T ) {
1082- mockCtrl := gomock .NewController (t )
1083- defer mockCtrl .Finish ()
1084-
1085- caAccountId := "myId"
1086- caAccountName := "MyAccountName"
1087- thumbprint := "MyThumbprint"
1088-
1089- revReq := & certificate.RevocationRequest {
1090- Thumbprint : thumbprint ,
1091- Reason : "" ,
1092- CertificateAuthorityAccountName : caAccountName ,
1093- }
1094-
1095- //1. mocking the caAccountsClient
1096- caAccountExpected := & caaccountssservice.ListCAAccountsCertificateAuthorityAccountsCertificateAuthorityAccountConnectionNodesCertificateAuthorityAccount {
1097- Id : caAccountId ,
1098- Name : "MyAccountName" ,
1099- CertificateAuthorityType : caaccountssservice .CertificateAuthorityTypeGlobalsign ,
1100- }
1101-
1102- listCAAccountsResponse := & caaccountssservice.ListCAAccountsResponse {
1103- CertificateAuthorityAccounts : & caaccountssservice.ListCAAccountsCertificateAuthorityAccountsCertificateAuthorityAccountConnection {
1104- Nodes : []* caaccountssservice.ListCAAccountsCertificateAuthorityAccountsCertificateAuthorityAccountConnectionNodesCertificateAuthorityAccount {
1105- caAccountExpected ,
1106- },
1107- },
1108- }
1109-
1110- caAccountsService := mocks .NewMockCAAccountsServiceWrapper (mockCtrl )
1111- caAccountsService .EXPECT ().ListCAAccounts (context .Background ()).Return (listCAAccountsResponse , nil )
1112-
1113- //replacing the caAccountsService reference with the mock
1114- conn .caAccountsClient .SetCAAccountsService (caAccountsService )
1115-
1116- revokeCertificate , err := conn .RevokeCertificate (revReq )
1117- require .Nil (t , revokeCertificate )
1118- require .Error (t , err )
1119- //require.ErrorContains(t, err, fmt.Sprintf("unsupported CA type for revocation: %s", caAccountExpected.CertificateAuthorityType))
1120- require .ErrorContains (t , err , fmt .Sprintf ("the CA type of the CA account %q is not supported for revocation. " +
1121- "It is only supported CA accounts of type %s" , caAccountExpected .Name , util .GetQuotedStrings (CATypesSupportedForRevocationSlice )))
1122- })
1123-
11241081}
11251082
11261083func TestReadPolicyConfigurationOnlyEC (t * testing.T ) {
0 commit comments