Ejemplo n.º 1
0
        private async Task PurgeRequestsAllApplications()
        {
            Skip.If(!_fixture.RegistrationOk);
            foreach (var application in _applicationTestSet)
            {
                foreach (var requestId in application.RequestIds)
                {
                    var request = await _certificateRequest.ReadAsync(requestId);

                    if (request.State == CertificateRequestState.Revoked ||
                        request.State == CertificateRequestState.Rejected ||
                        request.State == CertificateRequestState.Removed ||
                        request.State == CertificateRequestState.New)
                    {
                        await _certificateRequest.PurgeAsync(requestId);
                    }
                    else
                    {
                        await Assert.ThrowsAsync <ResourceInvalidStateException>(async() =>
                        {
                            await _certificateRequest.PurgeAsync(requestId);
                        });
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public async Task PurgeCertificateRequestAsync(string requestId)
 {
     // may require elevated rights to delete pk
     await _certificateRequest.PurgeAsync(requestId);
 }