From 09e87ef322101c0841445973b67ecc2c6a870eaf Mon Sep 17 00:00:00 2001 From: "panyintian.fu" Date: Fri, 25 Oct 2024 15:08:07 +0800 Subject: [PATCH] [e2e] add ca auto_renew check in e2e test Signed-off-by: panyintian.fu --- docs/overrides/test/kubean_testcase.md | 2 +- .../kubean_cluster_sonobouy_test.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/overrides/test/kubean_testcase.md b/docs/overrides/test/kubean_testcase.md index 77b1d8d4d..207e09db9 100644 --- a/docs/overrides/test/kubean_testcase.md +++ b/docs/overrides/test/kubean_testcase.md @@ -30,7 +30,7 @@ | | Support CRI: runc/kata/gvisor | | C-042 | | | | | | Support cilium: kube_pods_subnet | | C-001 | | [Code Link](../../test/kubean_cilium_cluster_e2e/create_cilium_cluster_test.go) | [detail](./testcase_details/create_cluster.md#create-cilium-cluster) | | | Support cilium: kube_service_addresses | | C-001 | | [Code Link](../../test/kubean_cilium_cluster_e2e/create_cilium_cluster_test.go) | [detail](./testcase_details/create_cluster.md#create-cilium-cluster) | -| | Support cluster ca auto_renew | auto_renew_certificates:true | C-001 | | | | +| | Support cluster ca auto_renew | auto_renew_certificates:true | C-001 | | [Code Link](../../test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go) | | | | Manual update ca | kubeadmin renew | C-015 | | | | | | Support overwrite hostname | | C-001 | | [Code Link](../../test/kubean_functions_e2e/kubean_cluster_install_test.go) | [detail](./testcase_details/create_cluster.md#support-overwrite-hostname) | | | Support install k8s on Readhat8 node: online | | C-001 | | [Code Link](../..test/kubean_os_compatibility_e2e/kubean_os_compatibility_test.go) | [detail](./testcase_details/create_cluster.md#support-readhat8-os) | diff --git a/test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go b/test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go index a28bc5681..ec0099ca4 100644 --- a/test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go +++ b/test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go @@ -93,6 +93,14 @@ var _ = ginkgo.Describe("e2e test cluster 1 master + 1 worker sonobouy check", f } }) + // check ca auto_renew + ginkgo.It("do ca auto_renew checking", func() { + checkCmd := tools.RemoteSSHCmdArrayByPasswd(password, []string{masterSSH, "systemctl list-timers |grep k8s-certs-renew.timer |wc -l"}) + checkOut, _ := tools.NewDoCmd("sshpass", checkCmd...) + klog.Info("ca auto_renew check out: ", checkOut.String()) + gomega.Expect(checkOut.String()).Should(gomega.ContainSubstring("1")) + }) + // check network configuration: // cat /proc/sys/net/ipv4/ip_forward: 1 // cat /proc/sys/net/ipv4/tcp_tw_recycle: 0