mirror of
https://github.com/bitnami/charts.git
synced 2026-03-01 06:58:20 +08:00
[bitnami/pinniped] Improve ginkgo tests debug output (#19687)
* [bitnami/pinniped] Improve ginkgo tests debug output Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add trigger Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove trigger Signed-off-by: Miguel Ruiz <miruiz@vmware.com> --------- Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
@@ -58,19 +58,17 @@ var _ = Describe("Pinniped:", func() {
|
||||
BeforeEach(func() {
|
||||
pattern := "Script finished correctly"
|
||||
|
||||
containsPattern, err := retry("containerLogsContainPattern", 5, 5*time.Second, func() (bool, error) {
|
||||
patternFound, err := retry("containerLogsContainPattern", 5, 5*time.Second, func() (bool, error) {
|
||||
return containerLogsContainPattern(ctx, coreclient, testingPod.GetName(), "vib-minideb", pattern)
|
||||
})
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
Expect(containsPattern).To(BeTrue())
|
||||
|
||||
minidebPods := getPodsByLabelOrDie(ctx, coreclient, "app=vib-minideb")
|
||||
minidebLogs = getContainerLogsOrDie(ctx, coreclient, minidebPods.Items[0].GetName(), "vib-minideb")
|
||||
|
||||
// Debug code left as is, given configuration complexity
|
||||
if !containsPattern {
|
||||
if !patternFound {
|
||||
fmt.Println("##### MINIDEB LOGS: #####")
|
||||
fmt.Println(minidebLogs)
|
||||
fmt.Println("###############")
|
||||
@@ -87,21 +85,37 @@ var _ = Describe("Pinniped:", func() {
|
||||
fmt.Println(supervisorLogs)
|
||||
fmt.Println("###############")
|
||||
}
|
||||
Expect(patternFound).To(BeTrue())
|
||||
})
|
||||
|
||||
It("the script was executed entirely", func() {
|
||||
containsPattern, _ := containsPattern(minidebLogs, "Script finished correctly")
|
||||
Expect(containsPattern).To(BeTrue())
|
||||
patternFound, _ := containsPattern(minidebLogs, "Script finished correctly")
|
||||
if !patternFound {
|
||||
fmt.Println("##### MINIDEB LOGS: #####")
|
||||
fmt.Println(minidebLogs)
|
||||
fmt.Println("###############")
|
||||
}
|
||||
Expect(patternFound).To(BeTrue())
|
||||
})
|
||||
|
||||
It("the pinniped cli produced the kubeconfig", func() {
|
||||
containsPattern, _ := containsPattern(minidebLogs, "connection to the cluster")
|
||||
Expect(containsPattern).To(BeTrue())
|
||||
patternFound, _ := containsPattern(minidebLogs, "connection to the cluster")
|
||||
if !patternFound {
|
||||
fmt.Println("##### MINIDEB LOGS: #####")
|
||||
fmt.Println(minidebLogs)
|
||||
fmt.Println("###############")
|
||||
}
|
||||
Expect(patternFound).To(BeTrue())
|
||||
})
|
||||
|
||||
It("the pinniped cli configured the cluster auth", func() {
|
||||
containsPattern, _ := containsPattern(minidebLogs, "Username: "+*authUser)
|
||||
Expect(containsPattern).To(BeTrue())
|
||||
patternFound, _ := containsPattern(minidebLogs, "Username: "+*authUser)
|
||||
if !patternFound {
|
||||
fmt.Println("##### MINIDEB LOGS: #####")
|
||||
fmt.Println(minidebLogs)
|
||||
fmt.Println("###############")
|
||||
}
|
||||
Expect(patternFound).To(BeTrue())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user