Skip to content

Commit 0598fdd

Browse files
acuminoschrej
authored andcommitted
Minor edit
1 parent 9be1850 commit 0598fdd

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
@@ -210,7 +210,7 @@ var _ = Describe("controller", func() {
210210
}()
211211

212212
<-sourceSynced
213-
}, 10.0)
213+
})
214214

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

522522
By("Removing the item from the queue")
523523
Eventually(queue.Len).Should(Equal(0))
524-
Eventually(func() int { return queue.NumRequeues(request) }).Should(Equal(0))
525-
}, 1.0)
524+
Eventually(func() int { return queue.NumRequeues(request) }, 1.0).Should(Equal(0))
525+
})
526526

527527
// TODO(directxman12): we should ensure that backoff occurrs with error requeue
528528

@@ -698,7 +698,7 @@ var _ = Describe("controller", func() {
698698
}
699699
return nil
700700
}, 2.0).Should(Succeed())
701-
}, 2.0)
701+
})
702702

703703
It("should get updated on reconcile errors", func() {
704704
Expect(func() error {
@@ -727,7 +727,7 @@ var _ = Describe("controller", func() {
727727
}
728728
return nil
729729
}, 2.0).Should(Succeed())
730-
}, 2.0)
730+
})
731731

732732
It("should get updated when reconcile returns with retry enabled", func() {
733733
Expect(func() error {
@@ -757,7 +757,7 @@ var _ = Describe("controller", func() {
757757
}
758758
return nil
759759
}, 2.0).Should(Succeed())
760-
}, 2.0)
760+
})
761761

762762
It("should get updated when reconcile returns with retryAfter enabled", func() {
763763
Expect(func() error {
@@ -786,7 +786,7 @@ var _ = Describe("controller", func() {
786786
}
787787
return nil
788788
}, 2.0).Should(Succeed())
789-
}, 2.0)
789+
})
790790
})
791791

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

832832
It("should add a reconcile time to the reconcile time histogram", func() {
833833
var reconcileTime dto.Metric
@@ -868,7 +868,7 @@ var _ = Describe("controller", func() {
868868
}
869869
return nil
870870
}, 2.0).Should(Succeed())
871-
}, 4.0)
871+
})
872872
})
873873
})
874874
})

0 commit comments

Comments
 (0)