[MM-14890] Logs endpoint always returns an empty line (#10559)

* fixed new line being returned in logs, improved the test

* improved the EOL check

* Fixed var shadowning
Этот коммит содержится в:
Eli Yukelzon
2019-04-18 12:16:49 +03:00
коммит произвёл Miguel de la Cruz
родитель 84a59ddb39
Коммит 6cc36ab176
2 изменённых файлов: 16 добавлений и 3 удалений

Просмотреть файл

@@ -198,6 +198,9 @@ func TestGetLogs(t *testing.T) {
t.Log(len(logs))
t.Fatal("wrong length")
}
for i := 10; i < 20; i++ {
assert.Containsf(t, logs[i-10], fmt.Sprintf(`"msg":"%d"`, i), "Log line doesn't contain correct message")
}
logs, resp = th.SystemAdminClient.GetLogs(1, 10)
CheckNoError(t, resp)