Skip to content

Commit

Permalink
debug kyma
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanxin committed Nov 26, 2024
1 parent b408fc8 commit 303492e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/e2e/no_default_cr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ var _ = Describe("Module Without Default CR", Ordered, func() {
WithContext(ctx).
WithArguments(skrClient, moduleCR).
Should(Equal(ErrNotFound))
kyma, _ := GetKyma(ctx, kcpClient, kyma.GetName(), kyma.GetNamespace())
GinkgoWriter.Printf("kyma %v\n", kyma)

By("And Kyma Module state of KCP Kyma CR is in \"Ready\" State")
Eventually(CheckModuleState).
WithContext(ctx).
Expand Down
24 changes: 24 additions & 0 deletions tests/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"testing"
"time"

certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
"go.uber.org/zap/zapcore"
Expand Down Expand Up @@ -98,6 +99,29 @@ var _ = BeforeSuite(func() {
defer GinkgoRecover()
Expect(err).ToNot(HaveOccurred(), "failed to run manager")
}()

go func() {
defer GinkgoRecover()
ticker := time.NewTicker(10 * time.Second)
defer ticker.Stop()
for {
select {
case <-ticker.C:
kcpKymaList := v1beta2.KymaList{}
err := kcpClient.List(ctx, &kcpKymaList)
if err == nil {
for _, kyma := range kcpKymaList.Items {
GinkgoWriter.Printf("kyma (%s) in cluster: Spec: %+v, Status: %+v\n", kyma.Name, kyma.Spec,
kyma.Status)
}
} else {
GinkgoWriter.Printf("error listing kcpKymaList: %v\n", err)
}
case <-ctx.Done():
return
}
}
}()
})

var _ = AfterSuite(func() {
Expand Down

0 comments on commit 303492e

Please sign in to comment.