mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
libnetwork: parallelTester.Do: use errdefs for error assertions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -1440,12 +1440,12 @@ func (pt parallelTester) Do(t *testing.T, thrNumber int) error {
|
||||
|
||||
for i := 0; i < pt.iterCnt; i++ {
|
||||
if err := ep.Join(context.Background(), sb); err != nil {
|
||||
if _, ok := err.(types.ForbiddenError); !ok {
|
||||
if !errdefs.IsForbidden(err) {
|
||||
return errors.Wrapf(err, "thread %d", thrNumber)
|
||||
}
|
||||
}
|
||||
if err := ep.Leave(context.Background(), sb); err != nil {
|
||||
if _, ok := err.(types.ForbiddenError); !ok {
|
||||
if !errdefs.IsForbidden(err) {
|
||||
return errors.Wrapf(err, "thread %d", thrNumber)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user