From 4cee8388cc799b723e9402284f25ad335d094f69 Mon Sep 17 00:00:00 2001 From: muzakh Date: Tue, 5 Dec 2023 01:35:04 +0100 Subject: [PATCH] included fullstop at the end of the same strings as well --- .../base64_aggressive_detector_test.go | 6 +++--- .../filecontent/filecontent_detector_test.go | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/detector/filecontent/base64_aggressive_detector_test.go b/detector/filecontent/base64_aggressive_detector_test.go index d6e1f2fd..50540460 100644 --- a/detector/filecontent/base64_aggressive_detector_test.go +++ b/detector/filecontent/base64_aggressive_detector_test.go @@ -29,7 +29,7 @@ func TestShouldFlagPotentialAWSAccessKeysInAggressiveMode(t *testing.T) { results, dummyCompletionCallbackFunc) - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldFlagPotentialAWSAccessKeysAtPropertyDefinitionInAggressiveMode(t *testing.T) { @@ -46,7 +46,7 @@ func TestShouldFlagPotentialAWSAccessKeysAtPropertyDefinitionInAggressiveMode(t results, dummyCompletionCallbackFunc) - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldNotFlagPotentialSecretsWithinSafeJavaCodeEvenInAggressiveMode(t *testing.T) { @@ -68,5 +68,5 @@ func TestShouldNotFlagPotentialSecretsWithinSafeJavaCodeEvenInAggressiveMode(t * results, dummyCompletionCallbackFunc) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } diff --git a/detector/filecontent/filecontent_detector_test.go b/detector/filecontent/filecontent_detector_test.go index 62440296..a12ae3d2 100644 --- a/detector/filecontent/filecontent_detector_test.go +++ b/detector/filecontent/filecontent_detector_test.go @@ -29,7 +29,7 @@ func TestShouldNotFlagSafeText(t *testing.T) { NewFileContentDetector(emptyTalismanRC). Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldIgnoreFileIfNeeded(t *testing.T) { @@ -63,7 +63,7 @@ func TestShouldNotFlag4CharSafeText(t *testing.T) { NewFileContentDetector(emptyTalismanRC). Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldNotFlagLowEntropyBase64Text(t *testing.T) { @@ -74,7 +74,7 @@ func TestShouldNotFlagLowEntropyBase64Text(t *testing.T) { NewFileContentDetector(emptyTalismanRC). Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldFlagPotentialAWSSecretKeys(t *testing.T) { @@ -88,7 +88,7 @@ func TestShouldFlagPotentialAWSSecretKeys(t *testing.T) { expectedMessage := fmt. Sprintf("Expected file to not contain base64 encoded texts such as: %s", awsSecretAccessKey) - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") assert.Equal(t, expectedMessage, getFailureMessages(results, filePath)[0]) assert.Len(t, results.Results, 1) } @@ -103,7 +103,7 @@ func TestShouldFlagPotentialSecretWithoutTrimmingWhenLengthLessThan50Characters( Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) expectedMessage := fmt.Sprintf("Expected file to not contain base64 encoded texts such as: %s", secret) - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") assert.Equal(t, expectedMessage, getFailureMessages(results, filePath)[0]) assert.Len(t, results.Results, 1) } @@ -121,7 +121,7 @@ func TestShouldFlagPotentialJWT(t *testing.T) { expectedMessage := fmt. Sprintf("Expected file to not contain base64 encoded texts such as: %s", jwt[:47]+"...") - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") assert.Equal(t, expectedMessage, getFailureMessages(results, filePath)[0]) assert.Len(t, results.Results, 1) } @@ -143,7 +143,7 @@ func TestShouldFlagPotentialSecretsWithinJavaCode(t *testing.T) { Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) expectedMessage := "Expected file to not contain base64 encoded texts such as: " + "accessKey=\"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPL..." - assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.True(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") assert.Equal(t, expectedMessage, getFailureMessages(results, filePath)[0]) assert.Len(t, results.Results, 1) } @@ -160,7 +160,7 @@ func TestShouldNotFlagPotentialSecretsWithinSafeJavaCode(t *testing.T) { NewFileContentDetector(emptyTalismanRC). Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldNotFlagPotentialSecretsWithinSafeLongMethodName(t *testing.T) { @@ -170,7 +170,7 @@ func TestShouldNotFlagPotentialSecretsWithinSafeLongMethodName(t *testing.T) { NewFileContentDetector(emptyTalismanRC). Test(defaultChecksumCompareUtility, additions, emptyTalismanRC, results, dummyCallback) - assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts") + assert.False(t, results.HasFailures(), "Expected file to not contain base64 encoded texts.") } func TestShouldFlagPotentialSecretsEncodedInHex(t *testing.T) {