From fad7a26156ac7313ee9c48e23eed9e6cf80ad996 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Fri, 9 Feb 2024 16:33:52 +0000 Subject: [PATCH] fix: improve flaky goldpinger test (#1463) We do not need to check if goldpinger pinged or not. At times it would have successful pings that lead to test failures. Its enough to just check that we have analysis results --- test/e2e/support-bundle/goldpinger_collector_e2e_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go index 93cf96a45..819d6805f 100644 --- a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go +++ b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go @@ -81,12 +81,9 @@ func Test_GoldpingerCollector(t *testing.T) { require.NoError(t, err) // Check that we analysed collected goldpinger results. - // There won't be any ping results because goldpinger would not have run yet. - // The test is fine since this checks that we query the goldpinger results correctly - // and the analyser is working. + // We should expect a single analysis result for goldpinger. require.Equal(t, 1, len(analysisResults)) assert.True(t, strings.HasPrefix(analysisResults[0].Name, "missing.ping.results.for.goldpinger.")) - assert.Equal(t, convert.SeverityWarn, analysisResults[0].Severity) return ctx }). Teardown(func(ctx context.Context, t *testing.T, c *envconf.Config) context.Context {