chainlink icon indicating copy to clipboard operation
chainlink copied to clipboard

[TT-1140] Cl node test log scanner

Open Tofel opened this issue 1 year ago • 1 comments

@anirudhwarrier do we want to fail only of zapcore.PanicLevel? Or should it be zapcore.ErrorLevel? In k8s we use the first one, but idk if it would have caught that error logs spam in Keepers that you mentioned, since it wasn't a panic. So maybe we should set it to ErrorLevel? But that might give us a lot of failures...

@iljapavlovs this should do what you want:

	logProcessor, processFn, err := logstream.GetRegexMatchingProcessor(env.LogStream, "BalanceMonitor: signalling balance worker")
	require.NoError(t, err, "Error getting regex matching processor")

	count, err := logProcessor.ProcessContainerLogs(env.ClCluster.Nodes[1].ContainerName, processFn)
	require.NoError(t, err, "Error scanning container logs for matches")

Tofel avatar May 09 '24 15:05 Tofel

@anirudhwarrier do we want to fail only of zapcore.PanicLevel? Or should it be zapcore.ErrorLevel? In k8s we use the first one, but idk if it would have caught that error logs spam in Keepers that you mentioned, since it wasn't a panic. So maybe we should set it to ErrorLevel? But that might give us a lot of failures...

I think it should be PanicLevel common to all tests. If any tests needs to override that, then those tests can do that.

anirudhwarrier avatar May 15 '24 07:05 anirudhwarrier