mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
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:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user