From 29bf88b1b089e2c99b27b2d0f8d460a936f749fe Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Thu, 2 Nov 2023 08:46:42 -0700 Subject: [PATCH] adjust test to check for non-tls option failure (#472) Signed-off-by: yaron2 --- client/client_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 8c6aa0ee..d858468d 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -134,9 +134,8 @@ func TestShutdown(t *testing.T) { } func TestWithTLS(t *testing.T) { - c, err := NewClientWithAddressContext(context.Background(), "127.0.0.1", WithTLS()) - require.NoError(t, err) - defer c.Close() + _, err := NewClientWithAddressContext(context.Background(), "127.0.0.1", WithTLS()) + require.Errorf(t, err, "error creating connection to '127.0.0.1': context deadline exceeded") } func getTestClient(ctx context.Context) (client Client, closer func()) {