workaround for cp bug 63245 and rename TestHA to TestMutliControlPlane

pull/17909/head
Predrag Rogic 2024-03-05 01:16:08 +00:00
parent 46ca79954f
commit 8c4e1a0f8b
No known key found for this signature in database
GPG Key ID: F1FF5748C4855229
2 changed files with 4 additions and 4 deletions

View File

@ -168,7 +168,7 @@ func backup(h host.Host, files []string) error {
errs := []error{}
for _, src := range []string{"/etc/cni", "/etc/kubernetes"} {
if _, err := r.RunCmd(exec.Command("sudo", "cp", "--archive", "--parents", "--force", src, vmpath.GuestBackupDir)); err != nil {
if _, err := r.RunCmd(exec.Command("sudo", "rsync", "--archive", "--relative", src, vmpath.GuestBackupDir)); err != nil {
errs = append(errs, errors.Errorf("failed to copy %q to %q (will continue): %v", src, vmpath.GuestBackupDir, err))
}
}
@ -203,7 +203,7 @@ func restore(h host.Host) error {
continue
}
src := path.Join(vmpath.GuestBackupDir, dst)
if _, err := r.RunCmd(exec.Command("sudo", "cp", "--archive", "--update", "--force", src, "/")); err != nil {
if _, err := r.RunCmd(exec.Command("sudo", "rsync", "--archive", "--update", src, "/")); err != nil {
errs = append(errs, errors.Errorf("failed to copy %q to %q (will continue): %v", src, dst, err))
}
}

View File

@ -35,8 +35,8 @@ import (
"k8s.io/minikube/pkg/util/retry"
)
// TestHA tests all ha (multi-control plane) cluster functionality
func TestHA(t *testing.T) {
// TestMutliControlPlane tests all ha (multi-control plane) cluster functionality
func TestMutliControlPlane(t *testing.T) {
if NoneDriver() {
t.Skip("none driver does not support multinode/ha(multi-control plane) cluster")
}