Skip to content

Commit 0f7872d

Browse files
committed
Minor edit
1 parent 257f210 commit 0f7872d

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

pkg/envtest/printer/prow.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ func AddReport(report ginkgo.Report, suiteName string) {
4646
if os.Getenv("CI") != "" && artifactsDir != "" {
4747
path := filepath.Join(artifactsDir, fmt.Sprintf("junit_%s_%d.xml", suiteName, report.SuiteConfig.ParallelProcess))
4848
err := reporters.GenerateJUnitReport(report, path)
49-
fmt.Printf("Failed to generate report\n\t%s", err.Error())
49+
if err != nil {
50+
fmt.Printf("Failed to generate report\n\t%s", err.Error())
51+
}
5052
}
5153
}

pkg/internal/controller/controller_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ var _ = Describe("controller", func() {
207207
}()
208208

209209
<-sourceSynced
210-
}, 10.0)
210+
})
211211

212212
It("should process events from source.Channel", func() {
213213
// channel to be closed when event is processed
@@ -518,8 +518,8 @@ var _ = Describe("controller", func() {
518518

519519
By("Removing the item from the queue")
520520
Eventually(queue.Len).Should(Equal(0))
521-
Eventually(func() int { return queue.NumRequeues(request) }).Should(Equal(0))
522-
}, 1.0)
521+
Eventually(func() int { return queue.NumRequeues(request) }, 1.0).Should(Equal(0))
522+
})
523523

524524
// TODO(directxman12): we should ensure that backoff occurrs with error requeue
525525

@@ -695,7 +695,7 @@ var _ = Describe("controller", func() {
695695
}
696696
return nil
697697
}, 2.0).Should(Succeed())
698-
}, 2.0)
698+
})
699699

700700
It("should get updated on reconcile errors", func() {
701701
Expect(func() error {
@@ -724,7 +724,7 @@ var _ = Describe("controller", func() {
724724
}
725725
return nil
726726
}, 2.0).Should(Succeed())
727-
}, 2.0)
727+
})
728728

729729
It("should get updated when reconcile returns with retry enabled", func() {
730730
Expect(func() error {
@@ -754,7 +754,7 @@ var _ = Describe("controller", func() {
754754
}
755755
return nil
756756
}, 2.0).Should(Succeed())
757-
}, 2.0)
757+
})
758758

759759
It("should get updated when reconcile returns with retryAfter enabled", func() {
760760
Expect(func() error {
@@ -783,7 +783,7 @@ var _ = Describe("controller", func() {
783783
}
784784
return nil
785785
}, 2.0).Should(Succeed())
786-
}, 2.0)
786+
})
787787
})
788788

789789
Context("should update prometheus metrics", func() {
@@ -824,7 +824,7 @@ var _ = Describe("controller", func() {
824824
By("Removing the item from the queue")
825825
Eventually(queue.Len).Should(Equal(0))
826826
Eventually(func() int { return queue.NumRequeues(request) }).Should(Equal(0))
827-
}, 2.0)
827+
})
828828

829829
It("should add a reconcile time to the reconcile time histogram", func() {
830830
var reconcileTime dto.Metric
@@ -865,7 +865,7 @@ var _ = Describe("controller", func() {
865865
}
866866
return nil
867867
}, 2.0).Should(Succeed())
868-
}, 4.0)
868+
})
869869
})
870870
})
871871
})

0 commit comments

Comments
 (0)