From 8f2a85c2e5031dfe2471ef14a6c7596933aff61e Mon Sep 17 00:00:00 2001 From: Apoorv Deshmukh Date: Tue, 12 Sep 2023 12:34:29 +0530 Subject: [PATCH] Minor test tweaks --- msdsn/conn_str_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msdsn/conn_str_test.go b/msdsn/conn_str_test.go index 08c1f377..76b6beaf 100644 --- a/msdsn/conn_str_test.go +++ b/msdsn/conn_str_test.go @@ -307,16 +307,16 @@ func TestReadCertificate(t *testing.T) { assert.NotNil(t, cert, "Expected certificate to be read, found nil") pemCertificate := derCertificate[:len(derCertificate)-len(filepath.Ext(derCertificate))] + ".pem" - os.Rename(derCertificate, pemCertificate) + _ = os.Rename(derCertificate, pemCertificate) cert, err = readCertificate(pemCertificate) assert.Nil(t, err, "Expected no error while reading certificate, found %v", err) assert.NotNil(t, cert, "Expected certificate to be read, found nil") // Test with an invalid certificate bakCertificate := derCertificate[:len(derCertificate)-len(filepath.Ext(derCertificate))] + ".bak" - os.Rename(pemCertificate, bakCertificate) + _ = os.Rename(pemCertificate, bakCertificate) cert, err = readCertificate(bakCertificate) assert.NotNil(t, err, "Expected error while reading certificate, found nil") assert.Nil(t, cert, "Expected certificate to be nil, found %v", cert) - os.Remove(bakCertificate) + _ = os.Remove(bakCertificate) }