Skip to content

Commit 9193453

Browse files
debug log
1 parent 4aa991f commit 9193453

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

tests/e2e/calico_ebpf/calico_ebpf_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ func Test_E2ECalicoEBPF(t *testing.T) {
2626
RunSpecs(t, "Validate dualstack in Calico eBPF Test Suite", suiteConfig, reporterConfig)
2727
}
2828

29+
func getHelmCalicoLog(kubeConfig string) string {
30+
cmd := "kubectl get pods -n tigera-operator -o name --kubeconfig=" + kubeConfig
31+
helmPod, err := e2e.RunCommand(cmd)
32+
if err != nil {
33+
return fmt.Sprintf("error getting tigera-operator pod: %v", err)
34+
}
35+
cmd = "kubectl logs -n tigera-operator " + strings.TrimSpace(helmPod) + " --kubeconfig=" + kubeConfig
36+
logs, err := e2e.RunCommand(cmd)
37+
if err != nil {
38+
return fmt.Sprintf("error getting tigera-operator logs: %v", err)
39+
}
40+
return logs
41+
}
42+
2943
var tc *e2e.TestConfig
3044
var _ = ReportAfterEach(e2e.GenReport)
3145

@@ -48,6 +62,12 @@ var _ = Describe("Verify DualStack in Calico eBPF configuration", Ordered, func(
4862

4963
It("Checks Node Status", func() {
5064
Eventually(func(g Gomega) {
65+
pods, err := e2e.ParsePods(tc.KubeconfigFile, false)
66+
fmt.Printf("pods: %v\n", pods)
67+
68+
calicoLogs := getHelmCalicoLog(tc.KubeconfigFile)
69+
fmt.Println(calicoLogs)
70+
5171
nodes, err := e2e.ParseNodes(tc.KubeconfigFile, false)
5272
g.Expect(err).NotTo(HaveOccurred())
5373
for _, node := range nodes {

tests/e2e/scripts/calico_ebpf_manifest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ spec:
2020
kubeProxyManagement: Enabled
2121
linuxDataplane: BPF
2222
kubernetesServiceEndpoint:
23-
host: localhost" >> /var/lib/rancher/rke2/server/manifests/e2e-calico.yaml
23+
host: $ip4_addr" >> /var/lib/rancher/rke2/server/manifests/e2e-calico.yaml

0 commit comments

Comments
 (0)