Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Fix unit test (#230)
Browse files Browse the repository at this point in the history
Preserves the behaviour of the http handler that it had before recent
changes to the `get volume` command
  • Loading branch information
Ricardo-Osorio committed Feb 27, 2023
1 parent 3ab399a commit 180f726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apiclient/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ func (c *Client) fetchAllVolumesParallel(ctx context.Context) ([]*model.Volume,
group.Go(func() error {
nsvols, err := c.Transport.ListVolumes(ctx, ns.ID)
switch {
case err == nil, errors.As(err, &UnauthorisedError{}), errors.Is(err, context.DeadlineExceeded):
case err == nil, errors.As(err, &UnauthorisedError{}):
// For an unauthorised error, ignore - its not fatal to the operation.
err = nil
case errors.Is(err, context.DeadlineExceeded):
default:
return err
}
Expand Down

0 comments on commit 180f726

Please sign in to comment.