aboutsummaryrefslogtreecommitdiff
path: root/reachability/unit_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'reachability/unit_test.go')
-rw-r--r--reachability/unit_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/reachability/unit_test.go b/reachability/unit_test.go
index dea6d38b..1a2f4773 100644
--- a/reachability/unit_test.go
+++ b/reachability/unit_test.go
@@ -164,8 +164,8 @@ func TestWalkDomainCommitsRejectsNonCommitRootAfterPeel(t *testing.T) {
t.Fatal("expected error")
}
- var typeErr *giterrors.ObjectTypeError
- if !errors.As(err, &typeErr) {
+ typeErr, ok := errors.AsType[*giterrors.ObjectTypeError](err)
+ if !ok {
t.Fatalf("expected ObjectTypeError, got %T (%v)", err, err)
}
@@ -280,8 +280,8 @@ func TestCheckConnectedReturnsConcreteMissingObject(t *testing.T) {
t.Fatal("expected error")
}
- var missing *giterrors.ObjectMissingError
- if !errors.As(err, &missing) {
+ missing, ok := errors.AsType[*giterrors.ObjectMissingError](err)
+ if !ok {
t.Fatalf("expected ObjectMissingError, got %T (%v)", err, err)
}