Skip to content

Commit

Permalink
return not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Jan 24, 2025
1 parent d62d1f1 commit 6c7ceb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/e2e/commontestutils/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func GetDeployment(ctx context.Context, clnt client.Client,
) (*apiappsv1.Deployment, error) {
deploy := &apiappsv1.Deployment{}
if err := clnt.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, deploy); err != nil {
if util.IsNotFound(err) {
return nil, testutils.ErrNotFound
}
return nil, fmt.Errorf("could not get deployment: %w", err)
}
return deploy, nil
Expand Down

0 comments on commit 6c7ceb1

Please sign in to comment.