Skip to content

Commit

Permalink
fix: improve flaky goldpinger test (#1463)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
banjoh authored Feb 9, 2024
1 parent 772d867 commit fad7a26
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/e2e/support-bundle/goldpinger_collector_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fad7a26

Please sign in to comment.