refactor(test): add lint rule for messages starting with the component (#2045)

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
LaurentiuNiculae
2023-12-08 00:05:02 -08:00
committed by GitHub
parent 262a904286
commit 79e14027ee
81 changed files with 855 additions and 681 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ import (
"golang.org/x/crypto/bcrypt"
)
var ErrNoGoModFileFound = errors.New("test: no go.mod file found in parent directories")
var ErrNoGoModFileFound = errors.New("no go.mod file found in parent directories")
func GetProjectRootDir() (string, error) {
workDir, err := os.Getwd()
+2 -2
View File
@@ -132,7 +132,7 @@ func TestReadLogFileAndSearchString(t *testing.T) {
Convey("Invalid path", t, func() {
_, err = tcommon.ReadLogFileAndSearchString("invalidPath",
"DB update completed, next update scheduled", 1*time.Second)
"cve-db update completed, next update scheduled after interval", 1*time.Second)
So(err, ShouldNotBeNil)
})
@@ -159,7 +159,7 @@ func TestReadLogFileAndCountStringOccurence(t *testing.T) {
Convey("Invalid path", t, func() {
_, err = tcommon.ReadLogFileAndCountStringOccurence("invalidPath",
"DB update completed, next update scheduled", 1*time.Second, 1)
"cve-db update completed, next update scheduled after interval", 1*time.Second, 1)
So(err, ShouldNotBeNil)
})