mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
test: update TestWSTLSVerifyClientCert for go1.21 (#4387)
Similar to #4380 , this TLS error message changed in Go 1.21.
This commit is contained in:
@@ -2202,7 +2202,7 @@ func TestWSTLSVerifyClientCert(t *testing.T) {
|
||||
if !test.provideCert {
|
||||
if err == nil {
|
||||
t.Fatal("Expected error, did not get one")
|
||||
} else if !strings.Contains(err.Error(), "bad certificate") {
|
||||
} else if !strings.Contains(err.Error(), "bad certificate") && !strings.Contains(err.Error(), "certificate required") {
|
||||
t.Fatalf("Unexpected error: %v", err)
|
||||
}
|
||||
return
|
||||
@@ -2306,7 +2306,7 @@ func TestWSTLSVerifyAndMap(t *testing.T) {
|
||||
if !test.provideCert {
|
||||
if err == nil {
|
||||
t.Fatal("Expected error, did not get one")
|
||||
} else if !strings.Contains(err.Error(), "bad certificate") {
|
||||
} else if !strings.Contains(err.Error(), "bad certificate") && !strings.Contains(err.Error(), "certificate required") {
|
||||
t.Fatalf("Unexpected error: %v", err)
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user