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:
Derek Nola 2022-04-14 11:46:37 -07:00 committed by GitHub
parent e4d2824fb6
commit 3bd7cdfa1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -181,6 +181,8 @@ func K3sKillServer(server *K3sServer) error {
}
// 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 {
if cni0Link, err := netlink.LinkByName("cni0"); err == nil {
links, _ := netlink.LinkList()
@ -207,7 +209,7 @@ func K3sCleanup(k3sTestLock int, dataDir string) error {
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) {
c := exec.Command("bash", "-c", cmd)
var out bytes.Buffer

View File

@ -99,7 +99,7 @@ var _ = Describe("secrets encryption rotation", func() {
To(ContainSubstring("reencryption started"))
Eventually(func() (string, error) {
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)
Expect(err).NotTo(HaveOccurred())
reg, err := regexp.Compile(`AES-CBC.+aescbckey.*`)