mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-05 05:24:16 -04:00
fix reference for statefile field and unwrap errors (#278)
* fix reference for statefile field * unwrap errors before checking status Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
a68ee817ff
commit
193a91d911
4 changed files with 27 additions and 5 deletions
|
@ -3,6 +3,7 @@ package retry
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -99,6 +100,13 @@ func TestServiceIsUnavailable(t *testing.T) {
|
|||
err: status.Error(codes.Unavailable, "error"),
|
||||
wantUnavailable: true,
|
||||
},
|
||||
"wrapped error": {
|
||||
err: fmt.Errorf("some wrapping: %w", status.Error(codes.Unavailable, "error")),
|
||||
wantUnavailable: true,
|
||||
},
|
||||
"code unknown": {
|
||||
err: status.Error(codes.Unknown, "unknown"),
|
||||
},
|
||||
}
|
||||
|
||||
for name, tc := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue