mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
fix: flaky goldpinger e2e test (#1499)
Installing the chart at times takes too long. We'll increase the time that we wait for the application to be healthy
This commit is contained in:
@@ -45,7 +45,7 @@ func Test_GoldpingerCollector(t *testing.T) {
|
||||
helm.WithNamespace(c.Namespace()),
|
||||
helm.WithChart(testutils.TestFixtureFilePath(t, "charts/goldpinger-6.0.1.tgz")),
|
||||
helm.WithWait(),
|
||||
helm.WithTimeout("1m"),
|
||||
helm.WithTimeout("2m"),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
return ctx
|
||||
@@ -82,8 +82,15 @@ func Test_GoldpingerCollector(t *testing.T) {
|
||||
|
||||
// Check that we analysed collected goldpinger results.
|
||||
// We should expect a single analysis result for goldpinger.
|
||||
require.Equal(t, 1, len(analysisResults))
|
||||
assert.Equal(t, 1, len(analysisResults))
|
||||
if t.Failed() {
|
||||
t.Logf("Analysis results: %s\n", analysisJSON)
|
||||
t.Logf("Stdout: %s\n", out.String())
|
||||
t.Logf("Stderr: %s\n", stdErr.String())
|
||||
t.FailNow()
|
||||
}
|
||||
assert.True(t, strings.HasPrefix(analysisResults[0].Name, "missing.ping.results.for.goldpinger."))
|
||||
|
||||
return ctx
|
||||
}).
|
||||
Teardown(func(ctx context.Context, t *testing.T, c *envconf.Config) context.Context {
|
||||
|
||||
@@ -45,13 +45,13 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
func getClusterFromContext(t *testing.T, ctx context.Context, clusterName string) *kind.Cluster {
|
||||
provider, ok := envfuncs.GetClusterFromContext(ctx, ClusterName)
|
||||
provider, ok := envfuncs.GetClusterFromContext(ctx, clusterName)
|
||||
if !ok {
|
||||
t.Fatalf("Failed to extract kind cluster %s from context", ClusterName)
|
||||
t.Fatalf("Failed to extract kind cluster %s from context", clusterName)
|
||||
}
|
||||
cluster, ok := provider.(*kind.Cluster)
|
||||
if !ok {
|
||||
t.Fatalf("Failed to cast kind cluster %s from provider", ClusterName)
|
||||
t.Fatalf("Failed to cast kind cluster %s from provider", clusterName)
|
||||
}
|
||||
|
||||
return cluster
|
||||
|
||||
Reference in New Issue
Block a user