Skip to content

Commit

Permalink
[e2e] add ca auto_renew check in e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: panyintian.fu <panyintian.fu@daocloud.io>
  • Loading branch information
panyintian.fu committed Oct 25, 2024
1 parent 4a6ce62 commit 09e87ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/overrides/test/kubean_testcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
| | Support CRI: runc/kata/gvisor | | C-042 | | | |
| | Support cilium: kube_pods_subnet | | C-001 | <ul><li>[x] </li></ul> | [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 | <ul><li>[x] </li></ul> | [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 | <ul><li>[x] </li></ul> | [Code Link](../../test/kubean_sonobouy_nightlye2e/kubean_cluster_sonobouy_test.go) | |
| | Manual update ca | kubeadmin renew | C-015 | | | |
| | Support overwrite hostname | | C-001 | <ul><li>[x] </li></ul> | [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 | <ul><li>[x] </li></ul> | [Code Link](../..test/kubean_os_compatibility_e2e/kubean_os_compatibility_test.go) | [detail](./testcase_details/create_cluster.md#support-readhat8-os) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09e87ef

Please sign in to comment.