fix(lint): tagged switch on the invite status; close checked in the relay test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebeed5f0cf
commit
ffe10d5ca6
2 files changed
+4
-4
No files matched your search
@@ -24,7 +24,7 @@ func plainRelay(t *testing.T) (host string, port int, cmds chan string) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
defer func() { _ = conn.Close() }()
|
||||
r := bufio.NewReader(conn)
|
||||
say := func(s string) { _, _ = conn.Write([]byte(s + "\r\n")) }
|
||||
say("220 relay.onprem.test ESMTP")
|
||||
|
||||
@@ -79,10 +79,10 @@ func (s *Server) adminReprovision(w http.ResponseWriter, r *http.Request) {
|
||||
s.writeKeycloakError(w, t.ID, "reprovision", err)
|
||||
return
|
||||
}
|
||||
switch {
|
||||
case res.Status == keycloak.InviteStatusAdded:
|
||||
switch res.Status {
|
||||
case keycloak.InviteStatusAdded:
|
||||
outcome = "added"
|
||||
case res.Status == keycloak.InviteStatusMember:
|
||||
case keycloak.InviteStatusMember:
|
||||
err := s.Keycloak.ResendInvite(ctx, t.Slug, email)
|
||||
switch {
|
||||
case errors.Is(err, keycloak.ErrNoInviteMail):
|
||||
|
||||
Reference in new issue
Block a user