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
+3 -3
View File
@@ -2091,7 +2091,7 @@ func TestConfigReloader(t *testing.T) {
data, err := os.ReadFile(logFile.Name())
t.Logf("downstream log: %s", string(data))
So(err, ShouldBeNil)
So(string(data), ShouldContainSubstring, "unable to start sync extension")
So(string(data), ShouldContainSubstring, "failed to start sync extension")
So(string(data), ShouldContainSubstring, "\"TLSVerify\":false")
So(string(data), ShouldContainSubstring, "\"OnDemand\":false")
})
@@ -2852,7 +2852,7 @@ func TestInvalidRegex(t *testing.T) {
defer dcm.StopServer()
found, err := test.ReadLogFileAndSearchString(dctlr.Config.Log.Output,
"couldn't compile regex", 15*time.Second)
"failed to compile regex", 15*time.Second)
if err != nil {
panic(err)
}
@@ -4974,7 +4974,7 @@ func TestOnDemandRetryGoroutineErr(t *testing.T) {
So(resp.StatusCode(), ShouldEqual, http.StatusNotFound)
found, err := test.ReadLogFileAndSearchString(dctlr.Config.Log.Output,
"sync routine: error while copying image", 15*time.Second)
"failed to copy image", 15*time.Second)
if err != nil {
panic(err)
}