Skip to content

Commit

Permalink
test: add new error handling for user not found (#216)
Browse files Browse the repository at this point in the history
feat: add new error handling for user not found
  • Loading branch information
panapol-p authored Jun 28, 2024
1 parent ff1465c commit b789afc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions charts/zitadel/acceptance/accessibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"crypto/x509"
"errors"
"fmt"
mgmt_api "github.com/zitadel/zitadel-go/v2/pkg/client/zitadel/management"
"net/http"
"strconv"
"strings"
"sync"
"time"

mgmt_api "github.com/zitadel/zitadel-go/v2/pkg/client/zitadel/management"

"github.com/gruntwork-io/terratest/modules/k8s"
corev1 "k8s.io/api/core/v1"
)
Expand Down Expand Up @@ -87,7 +88,9 @@ func (s *ConfigurationTest) checkAccessibility(pods []corev1.Pod) {
}
_, err = conn.Healthz(ctx, &mgmt_api.HealthzRequest{})
// TODO: Why is the key checked on the healthz RPC?
if strings.Contains(err.Error(), "Errors.AuthNKey.NotFound") || strings.Contains(err.Error(), "assertion invalid") {
if strings.Contains(err.Error(), "Errors.AuthNKey.NotFound") ||
strings.Contains(err.Error(), "Errors.User.NotFound") ||
strings.Contains(err.Error(), "assertion invalid") {
err = nil
}
return err
Expand Down

0 comments on commit b789afc

Please sign in to comment.