Skip to content

Commit

Permalink
print names of nodes without expected logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Dec 9, 2024
1 parent 4fa7ba6 commit 410e522
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
}

0 comments on commit 410e522

Please sign in to comment.