From 410e5220f1bc1bf505f5aaba739fc09a6a063a58 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Mon, 9 Dec 2024 10:18:43 +0100 Subject: [PATCH] print names of nodes without expected logs --- integration-tests/smoke/ocr2_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 9904753a0ff..a1b5ef7d947 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -334,6 +334,7 @@ func assertCorrectNodeConfiguration(t *testing.T, l zerolog.Logger, totalNodeCou close(resultsCh) var correctlyConfiguredNodes []string + var incorrectlyConfiguredNodes []string // check results for result := range resultsCh { @@ -344,6 +345,6 @@ func assertCorrectNodeConfiguration(t *testing.T, l zerolog.Logger, totalNodeCou } } - require.Equal(t, len(correctlyConfiguredNodes), expectedNodeCount, "%d nodes' logs were missing expected plugin configuration entries. Correctly configured nodes: %s. Expected log patterns: %s", expectedNodeCount-len(correctlyConfiguredNodes), strings.Join(correctlyConfiguredNodes, ","), strings.Join(expectedPatterns, ",")) + require.Equal(t, len(correctlyConfiguredNodes), expectedNodeCount, "%d nodes' logs were missing expected plugin configuration entries. Correctly configured nodes: %s. Nodes with missing configuration: %s. Expected log patterns: %s", expectedNodeCount-len(correctlyConfiguredNodes), strings.Join(correctlyConfiguredNodes, ", "), strings.Join(incorrectlyConfiguredNodes, ", "), strings.Join(expectedPatterns, ", ")) l.Info().Msg("All nodes have correct plugin configuration applied") }