From 4ba89dffabdd4cf868a0481c6f5c047886ba0822 Mon Sep 17 00:00:00 2001 From: Gus Carreon Date: Mon, 4 Nov 2019 16:17:22 -0500 Subject: [PATCH] Correct typos in commented lines --- ssl/ssl_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssl/ssl_test.go b/ssl/ssl_test.go index 2e7a4440995..c4c29d149ef 100644 --- a/ssl/ssl_test.go +++ b/ssl/ssl_test.go @@ -11,7 +11,7 @@ func TestCertsFromFilePoolExists(t *testing.T) { // Load hardcoded certificates found in ssl.go certPool := GetRootCAPool() - // Assert loaded certificates by looking at the lenght of the subjects array of strings + // Assert loaded certificates by looking at the length of the subjects array of strings subjects := certPool.Subjects() hardCodedSubNum := len(subjects) assert.True(t, hardCodedSubNum > 0) @@ -20,7 +20,7 @@ func TestCertsFromFilePoolExists(t *testing.T) { certificatesFile := "mockcertificates/mock-certs.pem" certPool, err := AppendPEMFileToRootCAPool(certPool, certificatesFile) - // Assert loaded certificates by looking at the lenght of the subjects array of strings + // Assert loaded certificates by looking at the length of the subjects array of strings assert.NoError(t, err, "Error thrown by AppendPEMFileToRootCAPool while loading file %s: %v", certificatesFile, err) subjects = certPool.Subjects() subNumIncludingFile := len(subjects) @@ -35,7 +35,7 @@ func TestCertsFromFilePoolDontExist(t *testing.T) { certificatesFile := "mockcertificates/mock-certs.pem" certPool, err := AppendPEMFileToRootCAPool(certPool, certificatesFile) - // Assert loaded certificates by looking at the lenght of the subjects array of strings + // Assert loaded certificates by looking at the length of the subjects array of strings assert.NoError(t, err, "Error thrown by AppendPEMFileToRootCAPool while loading file %s: %v", certificatesFile, err) subjects := certPool.Subjects() assert.Equal(t, len(subjects), 1, "We only loaded one vertificate from the file, len(subjects) should equal 1") @@ -45,10 +45,10 @@ func TestAppendPEMFileToRootCAPoolFail(t *testing.T) { // Empty certpool var certPool *x509.CertPool - // Load certificates from file + // In this test we are going to pass a file that does not exist as value of second argument fakeCertificatesFile := "mockcertificates/NO-FILE.pem" certPool, err := AppendPEMFileToRootCAPool(certPool, fakeCertificatesFile) - // Assert loaded certificates by looking at the lenght of the subjects array of strings + // Assert AppendPEMFileToRootCAPool correctly throws an error when trying to load an nonexisting file assert.Errorf(t, err, "AppendPEMFileToRootCAPool should throw an error by while loading fake file %s \n", fakeCertificatesFile) }