mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Bump Reencryption Test timeout, improve comments (#5431)
* Bump timeout, improve comments Signed-off-by: Derek Nola <derek.nola@suse.com> * codespell Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
e4d2824fb6
commit
3bd7cdfa1b
|
@ -181,6 +181,8 @@ func K3sKillServer(server *K3sServer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// K3sCleanup attempts to cleanup networking and files leftover from an integration test
|
// K3sCleanup attempts to cleanup networking and files leftover from an integration test
|
||||||
|
// this is similar to the k3s-killall.sh script, but we dynamically generate that on
|
||||||
|
// install, so we don't have access to it in testing.
|
||||||
func K3sCleanup(k3sTestLock int, dataDir string) error {
|
func K3sCleanup(k3sTestLock int, dataDir string) error {
|
||||||
if cni0Link, err := netlink.LinkByName("cni0"); err == nil {
|
if cni0Link, err := netlink.LinkByName("cni0"); err == nil {
|
||||||
links, _ := netlink.LinkList()
|
links, _ := netlink.LinkList()
|
||||||
|
@ -207,7 +209,7 @@ func K3sCleanup(k3sTestLock int, dataDir string) error {
|
||||||
return flock.Release(k3sTestLock)
|
return flock.Release(k3sTestLock)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunCommand Runs command on the cluster accessing the cluster through kubeconfig file
|
// RunCommand Runs command on the host
|
||||||
func RunCommand(cmd string) (string, error) {
|
func RunCommand(cmd string) (string, error) {
|
||||||
c := exec.Command("bash", "-c", cmd)
|
c := exec.Command("bash", "-c", cmd)
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
|
|
|
@ -99,7 +99,7 @@ var _ = Describe("secrets encryption rotation", func() {
|
||||||
To(ContainSubstring("reencryption started"))
|
To(ContainSubstring("reencryption started"))
|
||||||
Eventually(func() (string, error) {
|
Eventually(func() (string, error) {
|
||||||
return testutil.K3sCmd("secrets-encrypt status -d", secretsEncryptionDataDir)
|
return testutil.K3sCmd("secrets-encrypt status -d", secretsEncryptionDataDir)
|
||||||
}, "30s", "2s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
}, "45s", "2s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||||
result, err := testutil.K3sCmd("secrets-encrypt status -d", secretsEncryptionDataDir)
|
result, err := testutil.K3sCmd("secrets-encrypt status -d", secretsEncryptionDataDir)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
reg, err := regexp.Compile(`AES-CBC.+aescbckey.*`)
|
reg, err := regexp.Compile(`AES-CBC.+aescbckey.*`)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user