Skip to content

Commit

Permalink
workaround for cp bug 63245 and rename TestHA to TestMutliControlPlane
Browse files Browse the repository at this point in the history
  • Loading branch information
prezha committed Mar 5, 2024
1 parent 46ca799 commit 8c4e1a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/minikube/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down Expand Up @@ -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))
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/ha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 8c4e1a0

Please sign in to comment.