Skip to content

Commit 7e259a0

Browse files
committed
integration: make TestRevocation non-parallel
1 parent e5f08dd commit 7e259a0

1 file changed

Lines changed: 31 additions & 35 deletions

File tree

test/integration/revocation_test.go

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -388,43 +388,39 @@ func TestRevocation(t *testing.T) {
388388
for _, kind := range []certKind{precert, finalcert} {
389389
for _, reason := range []revocation.Reason{revocation.Unspecified, revocation.KeyCompromise, revocation.Superseded} {
390390
for _, method := range []authMethod{byAccount, byAuth, byKey, byAdmin} {
391-
wg.Add(1)
392-
go func() {
393-
defer wg.Done()
394-
cert := issueAndRevoke(testCase{
395-
method: method,
396-
reason: reason,
397-
kind: kind,
398-
// We do not expect any of these revocation requests to error.
399-
// The ones done byAccount will succeed as requested, but will not
400-
// result in the key being blocked for future issuance.
401-
// The ones done byAuth will succeed, but will be overwritten to have
402-
// reason code 5 (cessationOfOperation).
403-
// The ones done byKey will succeed, but will be overwritten to have
404-
// reason code 1 (keyCompromise), and will block the key.
405-
})
406-
407-
// If the request was made by demonstrating control over the
408-
// names, the reason should be overwritten to CessationOfOperation (5),
409-
// and if the request was made by key, then the reason should be set to
410-
// KeyCompromise (1).
411-
expectedReason := reason
412-
switch method {
413-
case byAuth:
414-
expectedReason = revocation.CessationOfOperation
415-
case byKey:
416-
expectedReason = revocation.KeyCompromise
417-
default:
418-
}
391+
cert := issueAndRevoke(testCase{
392+
method: method,
393+
reason: reason,
394+
kind: kind,
395+
// We do not expect any of these revocation requests to error.
396+
// The ones done byAccount will succeed as requested, but will not
397+
// result in the key being blocked for future issuance.
398+
// The ones done byAuth will succeed, but will be overwritten to have
399+
// reason code 5 (cessationOfOperation).
400+
// The ones done byKey will succeed, but will be overwritten to have
401+
// reason code 1 (keyCompromise), and will block the key.
402+
})
403+
404+
// If the request was made by demonstrating control over the
405+
// names, the reason should be overwritten to CessationOfOperation (5),
406+
// and if the request was made by key, then the reason should be set to
407+
// KeyCompromise (1).
408+
expectedReason := reason
409+
switch method {
410+
case byAuth:
411+
expectedReason = revocation.CessationOfOperation
412+
case byKey:
413+
expectedReason = revocation.KeyCompromise
414+
default:
415+
}
419416

420-
check := func(t *testing.T, allCRLs map[string][]*x509.RevocationList) {
421-
checkRevoked(t, allCRLs, cert, expectedReason)
422-
}
417+
check := func(t *testing.T, allCRLs map[string][]*x509.RevocationList) {
418+
checkRevoked(t, allCRLs, cert, expectedReason)
419+
}
423420

424-
rcMu.Lock()
425-
revocationChecks = append(revocationChecks, check)
426-
rcMu.Unlock()
427-
}()
421+
rcMu.Lock()
422+
revocationChecks = append(revocationChecks, check)
423+
rcMu.Unlock()
428424
}
429425
}
430426
}

0 commit comments

Comments
 (0)