File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ func Test_GoldpingerCollector(t *testing.T) {
4545 helm .WithNamespace (c .Namespace ()),
4646 helm .WithChart (testutils .TestFixtureFilePath (t , "charts/goldpinger-6.0.1.tgz" )),
4747 helm .WithWait (),
48- helm .WithTimeout ("1m " ),
48+ helm .WithTimeout ("2m " ),
4949 )
5050 require .NoError (t , err )
5151 return ctx
@@ -82,8 +82,15 @@ func Test_GoldpingerCollector(t *testing.T) {
8282
8383 // Check that we analysed collected goldpinger results.
8484 // We should expect a single analysis result for goldpinger.
85- require .Equal (t , 1 , len (analysisResults ))
85+ assert .Equal (t , 1 , len (analysisResults ))
86+ if t .Failed () {
87+ t .Logf ("Analysis results: %s\n " , analysisJSON )
88+ t .Logf ("Stdout: %s\n " , out .String ())
89+ t .Logf ("Stderr: %s\n " , stdErr .String ())
90+ t .FailNow ()
91+ }
8692 assert .True (t , strings .HasPrefix (analysisResults [0 ].Name , "missing.ping.results.for.goldpinger." ))
93+
8794 return ctx
8895 }).
8996 Teardown (func (ctx context.Context , t * testing.T , c * envconf.Config ) context.Context {
Original file line number Diff line number Diff line change @@ -45,13 +45,13 @@ func TestMain(m *testing.M) {
4545}
4646
4747func getClusterFromContext (t * testing.T , ctx context.Context , clusterName string ) * kind.Cluster {
48- provider , ok := envfuncs .GetClusterFromContext (ctx , ClusterName )
48+ provider , ok := envfuncs .GetClusterFromContext (ctx , clusterName )
4949 if ! ok {
50- t .Fatalf ("Failed to extract kind cluster %s from context" , ClusterName )
50+ t .Fatalf ("Failed to extract kind cluster %s from context" , clusterName )
5151 }
5252 cluster , ok := provider .(* kind.Cluster )
5353 if ! ok {
54- t .Fatalf ("Failed to cast kind cluster %s from provider" , ClusterName )
54+ t .Fatalf ("Failed to cast kind cluster %s from provider" , clusterName )
5555 }
5656
5757 return cluster
You can’t perform that action at this time.
0 commit comments