Skip to content

Commit

Permalink
Add extra connection error assert (spiffe#3840)
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Carvalho <[email protected]>
  • Loading branch information
guilhermocc authored and stevend-uber committed Oct 13, 2023
1 parent ab13cad commit 1aec101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/server/endpoints/endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,11 @@ func TestListenAndServe(t *testing.T) {

switch {
case strings.Contains(err.Error(), "connection reset by peer"):
case strings.Contains(err.Error(), "connection was forcibly closed by the remote host"):
case strings.Contains(err.Error(), "tls: bad certificate"):
return
default:
t.Error("expected invalid connection for misconfigured foreign admin caller")
t.Errorf("expected invalid connection for misconfigured foreign admin caller: %s", err.Error())
}
}
})
Expand Down

0 comments on commit 1aec101

Please sign in to comment.