From db6b0a50cd5747db9c4f90b8c98646e152bef242 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Fri, 12 Jul 2019 18:00:11 +0200 Subject: [PATCH 01/55] Added --delete-all flag --- cmd/minikube/cmd/delete.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 8b4f39672603..3be8449e06ea 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -35,6 +35,8 @@ import ( pkgutil "k8s.io/minikube/pkg/util" ) +var deleteAll bool + // deleteCmd represents the delete command var deleteCmd = &cobra.Command{ Use: "delete", @@ -105,5 +107,6 @@ func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsN } func init() { + deleteCmd.Flags().BoolVar(&deleteAll, "delete-all", false, "Set flag to delete all profiles") RootCmd.AddCommand(deleteCmd) } From 08b6edc781df4f9cb26909167b58387f0e8a91c5 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 13 Jul 2019 12:37:55 +0200 Subject: [PATCH 02/55] Added function to get all profiles --- cmd/minikube/cmd/config/profile.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 770e5f6bf25d..d350b2f9f6ab 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -17,7 +17,9 @@ limitations under the License. package config import ( + "io/ioutil" "os" + "path/filepath" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -71,3 +73,20 @@ var ProfileCmd = &cobra.Command{ console.Success("minikube profile was successfully set to %s", profile) }, } + +func GetAll() []string { + miniPath := constants.GetMinipath() + profilesPath := filepath.Join(miniPath, "profiles") + fileInfos, err := ioutil.ReadDir(profilesPath) + if err != nil { + console.ErrLn("Unable to list in dir: %s \n Error: %v", profilesPath, err) + } + + var profiles []string + for _, fileInfo := range fileInfos { + if fileInfo.IsDir() { + profiles = append(profiles, fileInfo.Name()) + } + } + return profiles +} From 6f2390b8f6f30cb0473484a47d819b6ed4846dd1 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 13 Jul 2019 23:36:00 +0200 Subject: [PATCH 03/55] Added function to check if profile-config is valid --- cmd/minikube/cmd/config/profile.go | 56 ++++++++++++++++++++++++++---- cmd/minikube/cmd/delete.go | 8 ++--- 2 files changed, 54 insertions(+), 10 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index d350b2f9f6ab..826e2ef3043b 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -17,17 +17,19 @@ limitations under the License. package config import ( - "io/ioutil" - "os" - "path/filepath" - + "encoding/json" + "fmt" "github.com/spf13/cobra" "github.com/spf13/viper" + "io/ioutil" + "k8s.io/kubernetes/cmd/kube-scheduler/app/config" pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" pkgutil "k8s.io/minikube/pkg/util" + "os" + "path/filepath" ) // ProfileCmd represents the profile command @@ -74,7 +76,7 @@ var ProfileCmd = &cobra.Command{ }, } -func GetAll() []string { +func GetAllProfiles() []string { miniPath := constants.GetMinipath() profilesPath := filepath.Join(miniPath, "profiles") fileInfos, err := ioutil.ReadDir(profilesPath) @@ -85,8 +87,50 @@ func GetAll() []string { var profiles []string for _, fileInfo := range fileInfos { if fileInfo.IsDir() { - profiles = append(profiles, fileInfo.Name()) + profilePath := filepath.Join(profilesPath, fileInfo.Name()) + if isValidProfile(profilePath) { + profiles = append(profiles, fileInfo.Name()) + } } } return profiles } + +func isValidProfile(profilePath string) bool { + fileInfos, err := ioutil.ReadDir(profilePath) + if err != nil { + console.ErrLn("Unable to list in dir: %s \n Error: %v", profilePath, err) + } + + hasConfigJson := false + for _, fileInfo := range fileInfos { + if fileInfo.Name() == "config.json" { + hasConfigJson = true + } + } + + if !hasConfigJson { + return false + } + + // TODO: Use constants? + profileConfigPath := filepath.Join(profilePath, "config.json") + fmt.Println(profileConfigPath) + bytes, err := ioutil.ReadFile(profileConfigPath) + if err != nil { + console.ErrLn("Unable to read file: %s \n Error: %v", profileConfigPath, err) + } + + fileContent := string(bytes) + fmt.Println(fileContent) + + var configObject config.Config + + errUnmarshal := json.Unmarshal(bytes, &configObject) + + if errUnmarshal != nil { + console.ErrLn("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) + } + + return &configObject != nil +} diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 3be8449e06ea..3a6dce80cde9 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -51,7 +51,7 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.Usage("usage: minikube delete") } - profile := viper.GetString(pkg_config.MachineProfile) + profileName := viper.GetString(pkg_config.MachineProfile) api, err := machine.NewAPIClient() if err != nil { exit.WithError("Error getting client", err) @@ -71,7 +71,7 @@ func runDelete(cmd *cobra.Command, args []string) { if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - console.OutStyle(console.Meh, "%q cluster does not exist", profile) + console.OutStyle(console.Meh, "%q cluster does not exist", profileName) default: exit.WithError("Failed to delete cluster", err) } @@ -83,12 +83,12 @@ func runDelete(cmd *cobra.Command, args []string) { if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil { if os.IsNotExist(err) { - console.OutStyle(console.Meh, "%q profile does not exist", profile) + console.OutStyle(console.Meh, "%q profile does not exist", profileName) os.Exit(0) } exit.WithError("Failed to remove profile", err) } - console.OutStyle(console.Crushed, "The %q cluster has been deleted.", profile) + console.OutStyle(console.Crushed, "The %q cluster has been deleted.", profileName) machineName := pkg_config.GetMachineName() if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { From 6c4749b33c604576ca89cb58b398f973010b3e1a Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 13 Jul 2019 23:57:27 +0200 Subject: [PATCH 04/55] Bugfix: Imported wrong configname --- cmd/minikube/cmd/config/profile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 826e2ef3043b..ce09da4d2216 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "io/ioutil" - "k8s.io/kubernetes/cmd/kube-scheduler/app/config" + minikubeConfig "k8s.io/minikube/pkg/minikube/config" pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/constants" @@ -124,7 +124,7 @@ func isValidProfile(profilePath string) bool { fileContent := string(bytes) fmt.Println(fileContent) - var configObject config.Config + var configObject minikubeConfig.Config errUnmarshal := json.Unmarshal(bytes, &configObject) From f9e849066bceed81a4bf49d81b8585dae6300f14 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sun, 14 Jul 2019 00:14:12 +0200 Subject: [PATCH 05/55] Removed debug code Added skeleton for IsProfileConfigValid --- cmd/minikube/cmd/config/profile.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index ce09da4d2216..f7295813d30d 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -115,22 +115,20 @@ func isValidProfile(profilePath string) bool { // TODO: Use constants? profileConfigPath := filepath.Join(profilePath, "config.json") - fmt.Println(profileConfigPath) bytes, err := ioutil.ReadFile(profileConfigPath) if err != nil { console.ErrLn("Unable to read file: %s \n Error: %v", profileConfigPath, err) } - fileContent := string(bytes) - fmt.Println(fileContent) - var configObject minikubeConfig.Config - errUnmarshal := json.Unmarshal(bytes, &configObject) if errUnmarshal != nil { console.ErrLn("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) } - return &configObject != nil } + +func IsProfileConfigValid(configObject minikubeConfig.Config) bool { + return true +} From 13f40f4bf271eff96b0e2617697ae4652ce31c2a Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sun, 14 Jul 2019 14:33:13 +0200 Subject: [PATCH 06/55] Check if machineConfig and kubernetesConfig is not empty --- cmd/minikube/cmd/config/profile.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index f7295813d30d..63f3db460a81 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -18,7 +18,6 @@ package config import ( "encoding/json" - "fmt" "github.com/spf13/cobra" "github.com/spf13/viper" "io/ioutil" @@ -30,6 +29,7 @@ import ( pkgutil "k8s.io/minikube/pkg/util" "os" "path/filepath" + "reflect" ) // ProfileCmd represents the profile command @@ -126,9 +126,17 @@ func isValidProfile(profilePath string) bool { if errUnmarshal != nil { console.ErrLn("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) } - return &configObject != nil + return IsProfileConfigValid(configObject) } func IsProfileConfigValid(configObject minikubeConfig.Config) bool { + machineConfig := configObject.MachineConfig + kubernetesConfig := configObject.KubernetesConfig + if reflect.DeepEqual(machineConfig, minikubeConfig.MachineConfig{}) || reflect.DeepEqual(kubernetesConfig, minikubeConfig.KubernetesConfig{}) { + return false + } + + //TODO: Validate MachineConfig and KubernetesConfig? + return true } From dd9afd1783a3dadddbb73b69dae639432cbe1ed7 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sun, 14 Jul 2019 22:02:33 +0200 Subject: [PATCH 07/55] Ensure usage of --delete-all without -p flag Added skeleton for deleteAllProfiles function --- cmd/minikube/cmd/delete.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 3a6dce80cde9..ea80cd6d6840 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -17,6 +17,7 @@ limitations under the License. package cmd import ( + "fmt" "os" "github.com/docker/machine/libmachine" @@ -51,6 +52,19 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.Usage("usage: minikube delete") } + + profileFlag, _ := cmd.Flags().GetString("profile") + deleteAllFlag, _ := cmd.Flags().GetBool("delete-all") + + if profileFlag != constants.DefaultMachineName && deleteAllFlag { + exit.Usage("usage: minikube delete --delete-all") + } + + if deleteAllFlag { + profiles := cmdcfg.GetAllProfiles() + deleteAllProfiles(profiles) + } + profileName := viper.GetString(pkg_config.MachineProfile) api, err := machine.NewAPIClient() if err != nil { @@ -96,6 +110,13 @@ func runDelete(cmd *cobra.Command, args []string) { } } +func deleteAllProfiles(profiles []string) { + for _, profile := range profiles { + fmt.Println(profile) + } + os.Exit(0) +} + func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) { console.OutStyle(console.Resetting, "Uninstalling Kubernetes %s using %s ...", kc.KubernetesVersion, bsName) clusterBootstrapper, err := GetClusterBootstrapper(api, bsName) From 72a9493dfbd8e1078537204d3c003c2e53333f52 Mon Sep 17 00:00:00 2001 From: Marek Schwarz <20537480+marekschwarz@users.noreply.github.com> Date: Mon, 15 Jul 2019 12:30:39 +0200 Subject: [PATCH 08/55] Renamed delte-all flag to all --- cmd/minikube/cmd/delete.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index ea80cd6d6840..3ea7ae12c5c3 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -54,10 +54,10 @@ func runDelete(cmd *cobra.Command, args []string) { } profileFlag, _ := cmd.Flags().GetString("profile") - deleteAllFlag, _ := cmd.Flags().GetBool("delete-all") + deleteAllFlag, _ := cmd.Flags().GetBool("all") if profileFlag != constants.DefaultMachineName && deleteAllFlag { - exit.Usage("usage: minikube delete --delete-all") + exit.Usage("usage: minikube delete --all") } if deleteAllFlag { @@ -128,6 +128,6 @@ func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsN } func init() { - deleteCmd.Flags().BoolVar(&deleteAll, "delete-all", false, "Set flag to delete all profiles") + deleteCmd.Flags().BoolVar(&deleteAll, "all", false, "Set flag to delete all profiles") RootCmd.AddCommand(deleteCmd) } From 925e803e85bf755df54b2279d895ce95cd11b318 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 16 Jul 2019 21:20:20 +0200 Subject: [PATCH 09/55] Added deleteProfile function --- cmd/minikube/cmd/delete.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index ea80cd6d6840..a52852453f7f 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -49,10 +49,6 @@ associated files.`, // runDelete handles the executes the flow of "minikube delete" func runDelete(cmd *cobra.Command, args []string) { - if len(args) > 0 { - exit.Usage("usage: minikube delete") - } - profileFlag, _ := cmd.Flags().GetString("profile") deleteAllFlag, _ := cmd.Flags().GetBool("delete-all") @@ -63,9 +59,17 @@ func runDelete(cmd *cobra.Command, args []string) { if deleteAllFlag { profiles := cmdcfg.GetAllProfiles() deleteAllProfiles(profiles) + } else { + if len(args) > 0 { + exit.Usage("usage: minikube delete") + } + + profileName := viper.GetString(pkg_config.MachineProfile) + deleteProfile(profileName) } +} - profileName := viper.GetString(pkg_config.MachineProfile) +func deleteProfile(profileName string) { api, err := machine.NewAPIClient() if err != nil { exit.WithError("Error getting client", err) From 3c4b1b1656e5312a41e5aecf9287239583b469a3 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 16 Jul 2019 21:20:59 +0200 Subject: [PATCH 10/55] Renamed minikubeConfig to mkConfig Renamed hasConfigJson to hasConfigJSON --- cmd/minikube/cmd/config/profile.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 63f3db460a81..0bde7f6149c5 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -21,7 +21,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "io/ioutil" - minikubeConfig "k8s.io/minikube/pkg/minikube/config" + mkConfig "k8s.io/minikube/pkg/minikube/config" pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/constants" @@ -102,14 +102,14 @@ func isValidProfile(profilePath string) bool { console.ErrLn("Unable to list in dir: %s \n Error: %v", profilePath, err) } - hasConfigJson := false + hasConfigJSON := false for _, fileInfo := range fileInfos { if fileInfo.Name() == "config.json" { - hasConfigJson = true + hasConfigJSON = true } } - if !hasConfigJson { + if !hasConfigJSON { return false } @@ -120,7 +120,7 @@ func isValidProfile(profilePath string) bool { console.ErrLn("Unable to read file: %s \n Error: %v", profileConfigPath, err) } - var configObject minikubeConfig.Config + var configObject mkConfig.Config errUnmarshal := json.Unmarshal(bytes, &configObject) if errUnmarshal != nil { @@ -129,10 +129,10 @@ func isValidProfile(profilePath string) bool { return IsProfileConfigValid(configObject) } -func IsProfileConfigValid(configObject minikubeConfig.Config) bool { +func IsProfileConfigValid(configObject mkConfig.Config) bool { machineConfig := configObject.MachineConfig kubernetesConfig := configObject.KubernetesConfig - if reflect.DeepEqual(machineConfig, minikubeConfig.MachineConfig{}) || reflect.DeepEqual(kubernetesConfig, minikubeConfig.KubernetesConfig{}) { + if reflect.DeepEqual(machineConfig, mkConfig.MachineConfig{}) || reflect.DeepEqual(kubernetesConfig, mkConfig.KubernetesConfig{}) { return false } From d0e749b3a00e1470f6ffb9aa20add8254f648c2d Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 16 Jul 2019 22:08:47 +0200 Subject: [PATCH 11/55] Implemented deleteAllProfiles --- cmd/minikube/cmd/delete.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index eb712e45d21b..7b686ec13e65 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -17,7 +17,6 @@ limitations under the License. package cmd import ( - "fmt" "os" "github.com/docker/machine/libmachine" @@ -116,7 +115,9 @@ func deleteProfile(profileName string) { func deleteAllProfiles(profiles []string) { for _, profile := range profiles { - fmt.Println(profile) + // TODO: Refactor: viper.Set seems to be in the wrong place + viper.Set(pkg_config.MachineProfile, profile) + deleteProfile(profile) } os.Exit(0) } From 9e73f6e4aa562834e2aaa4dda5d4f6c446430508 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 18 Jul 2019 08:47:05 +0200 Subject: [PATCH 12/55] Refactor review findings Removed IsProfileConfigValid Added TODOs --- cmd/minikube/cmd/config/profile.go | 39 ++++++++++++------------------ cmd/minikube/cmd/delete.go | 27 +++++++++++++-------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 0bde7f6149c5..c8d438eecec0 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -18,6 +18,7 @@ package config import ( "encoding/json" + "fmt" "github.com/spf13/cobra" "github.com/spf13/viper" "io/ioutil" @@ -29,7 +30,6 @@ import ( pkgutil "k8s.io/minikube/pkg/util" "os" "path/filepath" - "reflect" ) // ProfileCmd represents the profile command @@ -76,30 +76,34 @@ var ProfileCmd = &cobra.Command{ }, } -func GetAllProfiles() []string { +func GetAllProfiles() ([]string, error) { miniPath := constants.GetMinipath() profilesPath := filepath.Join(miniPath, "profiles") fileInfos, err := ioutil.ReadDir(profilesPath) if err != nil { - console.ErrLn("Unable to list in dir: %s \n Error: %v", profilesPath, err) + return nil, fmt.Errorf("Unable to list in dir: %s \n Error: %v", profilesPath, err) } var profiles []string for _, fileInfo := range fileInfos { if fileInfo.IsDir() { profilePath := filepath.Join(profilesPath, fileInfo.Name()) - if isValidProfile(profilePath) { + isValidProfile, err := isValidProfile(profilePath) + if err != nil { + return nil, err + } + if isValidProfile { profiles = append(profiles, fileInfo.Name()) } } } - return profiles + return profiles, nil } -func isValidProfile(profilePath string) bool { +func isValidProfile(profilePath string) (bool, error) { fileInfos, err := ioutil.ReadDir(profilePath) if err != nil { - console.ErrLn("Unable to list in dir: %s \n Error: %v", profilePath, err) + return false, fmt.Errorf("Unable to list in dir: %s \n Error: %v", profilePath, err) } hasConfigJSON := false @@ -110,33 +114,22 @@ func isValidProfile(profilePath string) bool { } if !hasConfigJSON { - return false + return false, nil } // TODO: Use constants? profileConfigPath := filepath.Join(profilePath, "config.json") bytes, err := ioutil.ReadFile(profileConfigPath) if err != nil { - console.ErrLn("Unable to read file: %s \n Error: %v", profileConfigPath, err) + return false, fmt.Errorf("Unable to read file: %s \n Error: %v", profileConfigPath, err) } var configObject mkConfig.Config errUnmarshal := json.Unmarshal(bytes, &configObject) if errUnmarshal != nil { - console.ErrLn("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) - } - return IsProfileConfigValid(configObject) -} - -func IsProfileConfigValid(configObject mkConfig.Config) bool { - machineConfig := configObject.MachineConfig - kubernetesConfig := configObject.KubernetesConfig - if reflect.DeepEqual(machineConfig, mkConfig.MachineConfig{}) || reflect.DeepEqual(kubernetesConfig, mkConfig.KubernetesConfig{}) { - return false + return false, fmt.Errorf("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) + } else { + return true, nil } - - //TODO: Validate MachineConfig and KubernetesConfig? - - return true } diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 9149427db997..790b4c2965f4 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -48,15 +48,21 @@ associated files.`, // runDelete handles the executes the flow of "minikube delete" func runDelete(cmd *cobra.Command, args []string) { - profileFlag, _ := cmd.Flags().GetString("profile") - deleteAllFlag, _ := cmd.Flags().GetBool("all") - - if profileFlag != constants.DefaultMachineName && deleteAllFlag { - exit.Usage("usage: minikube delete --all") + profileFlag, err := cmd.Flags().GetString("profile") + if err != nil { + exit.WithError("Could not get profile flag", err) } - if deleteAllFlag { - profiles := cmdcfg.GetAllProfiles() + if deleteAll { + if profileFlag != constants.DefaultMachineName { + exit.Usage("usage: minikube delete --all") + } + + profiles, err := cmdcfg.GetAllProfiles() + if err != nil { + exit.WithError("Error getting profiles to delete", err) + } + deleteAllProfiles(profiles) } else { if len(args) > 0 { @@ -68,7 +74,10 @@ func runDelete(cmd *cobra.Command, args []string) { } } +//TODO Refactor: Return errors? func deleteProfile(profileName string) { + viper.Set(pkg_config.MachineProfile, profileName) + api, err := machine.NewAPIClient() if err != nil { exit.WithError("Error getting client", err) @@ -115,13 +124,11 @@ func deleteProfile(profileName string) { func deleteAllProfiles(profiles []string) { for _, profile := range profiles { - // TODO: Refactor: viper.Set seems to be in the wrong place - viper.Set(pkg_config.MachineProfile, profile) deleteProfile(profile) } - os.Exit(0) } +// TODO: Return errors? func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) { console.OutStyle(console.Resetting, "Uninstalling Kubernetes %s using %s ...", kc.KubernetesVersion, bsName) clusterBootstrapper, err := getClusterBootstrapper(api, bsName) From 42a58500f6a25a1d6353e16344eecec10c092e66 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 18 Jul 2019 11:40:52 +0200 Subject: [PATCH 13/55] Fixed lint errors --- cmd/minikube/cmd/config/profile.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index c8d438eecec0..46de4d02edec 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -81,7 +81,7 @@ func GetAllProfiles() ([]string, error) { profilesPath := filepath.Join(miniPath, "profiles") fileInfos, err := ioutil.ReadDir(profilesPath) if err != nil { - return nil, fmt.Errorf("Unable to list in dir: %s \n Error: %v", profilesPath, err) + return nil, fmt.Errorf("unable to list in dir: %s \n error: %v", profilesPath, err) } var profiles []string @@ -103,7 +103,7 @@ func GetAllProfiles() ([]string, error) { func isValidProfile(profilePath string) (bool, error) { fileInfos, err := ioutil.ReadDir(profilePath) if err != nil { - return false, fmt.Errorf("Unable to list in dir: %s \n Error: %v", profilePath, err) + return false, fmt.Errorf("unable to list in dir: %s \n error: %v", profilePath, err) } hasConfigJSON := false @@ -121,15 +121,14 @@ func isValidProfile(profilePath string) (bool, error) { profileConfigPath := filepath.Join(profilePath, "config.json") bytes, err := ioutil.ReadFile(profileConfigPath) if err != nil { - return false, fmt.Errorf("Unable to read file: %s \n Error: %v", profileConfigPath, err) + return false, fmt.Errorf("unable to read file: %s \n Error: %v", profileConfigPath, err) } var configObject mkConfig.Config errUnmarshal := json.Unmarshal(bytes, &configObject) if errUnmarshal != nil { - return false, fmt.Errorf("Could not unmarshal config json to config object: %s \n Error: %v", profileConfigPath, err) - } else { - return true, nil + return false, fmt.Errorf("could not unmarshal config json to config object: %s \n error: %v", profileConfigPath, err) } + return true, nil } From af571430a94f704fb82fa54769634712e9814df2 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 18 Jul 2019 11:51:45 +0200 Subject: [PATCH 14/55] Fixed translation errors --- translations/fr-FR.json | 3 +++ translations/zh-CN.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/translations/fr-FR.json b/translations/fr-FR.json index dbb1c262555e..9c8225909a40 100644 --- a/translations/fr-FR.json +++ b/translations/fr-FR.json @@ -22,6 +22,7 @@ "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", "Configuring environment for Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}}": "Configurant l'environment pour Kubernetes {{.k8sVersion}} sur {{.runtime}} {{.runtimeVersion}}", "Configuring local host environment ...": "", + "Could not get profile flag": "", "Creating %s VM (CPUs=%d, Memory=%dMB, Disk=%dMB) ...": "Créant un VM %s (CPUs=%d, Mémoire=%dMB, Disque=%dMB)", "Creating mount {{.name}} ...": "", "Deleting %q from %s ...": "", @@ -59,6 +60,7 @@ "Error getting host status": "", "Error getting machine logs": "", "Error getting machine status": "", + "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: %s and labels %s:%s: %v": "", "Error getting the host IP address to use from within the VM": "", @@ -277,6 +279,7 @@ "usage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", "usage: minikube config unset PROPERTY_NAME": "", "usage: minikube delete": "", + "usage: minikube delete --all": "", "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", "{{.addonName}} was successfully enabled": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 294f672ec07d..e176e24b7712 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -22,6 +22,7 @@ "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", "Configuring environment for Kubernetes {{.k8sVersion}} on {{.runtime}} {{.runtimeVersion}}": "开始为Kubernetes {{.k8sVersion}},{{.runtime}} {{.runtimeVersion}} 配置环境变量", "Configuring local host environment ...": "", + "Could not get profile flag": "", "Creating %s VM (CPUs=%d, Memory=%dMB, Disk=%dMB) ...": "正在创建%s虚拟机(CPU=%d,内存=%dMB,磁盘=%dMB)...", "Creating mount {{.name}} ...": "", "Deleting %q from %s ...": "", @@ -59,6 +60,7 @@ "Error getting host status": "", "Error getting machine logs": "", "Error getting machine status": "", + "Error getting profiles to delete": "", "Error getting service status": "", "Error getting service with namespace: %s and labels %s:%s: %v": "", "Error getting the host IP address to use from within the VM": "", @@ -277,6 +279,7 @@ "usage: minikube config set PROPERTY_NAME PROPERTY_VALUE": "", "usage: minikube config unset PROPERTY_NAME": "", "usage: minikube delete": "", + "usage: minikube delete --all": "", "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", "{{.addonName}} was successfully enabled": "", From 4c6af0281a70bb5051a08a88068125bd3ad614b5 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 18 Jul 2019 13:21:53 +0200 Subject: [PATCH 15/55] Fixed goimports lint error --- cmd/minikube/cmd/config/profile.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 46de4d02edec..3426df4bb7b4 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -19,17 +19,18 @@ package config import ( "encoding/json" "fmt" + "io/ioutil" + "os" + "path/filepath" + "github.com/spf13/cobra" "github.com/spf13/viper" - "io/ioutil" mkConfig "k8s.io/minikube/pkg/minikube/config" pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" pkgutil "k8s.io/minikube/pkg/util" - "os" - "path/filepath" ) // ProfileCmd represents the profile command From 48bd69c895e15d9f61ef4a0f31b04016f67a7379 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 20 Jul 2019 18:57:27 +0200 Subject: [PATCH 16/55] Integrated ListProfiles() Removed GetAllProfiles() Made LoadProfile public --- cmd/minikube/cmd/config/profile.go | 62 ------------------------------ cmd/minikube/cmd/delete.go | 31 +++++++++------ pkg/minikube/config/profile.go | 4 +- 3 files changed, 21 insertions(+), 76 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 55ef79626944..c15be55847ab 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -17,15 +17,10 @@ limitations under the License. package config import ( - "encoding/json" - "fmt" - "io/ioutil" "os" - "path/filepath" "github.com/spf13/cobra" "github.com/spf13/viper" - mkConfig "k8s.io/minikube/pkg/minikube/config" pkgConfig "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" @@ -76,60 +71,3 @@ var ProfileCmd = &cobra.Command{ out.SuccessT("minikube profile was successfully set to {{.profile_name}}", out.V{"profile_name": profile}) }, } - -func GetAllProfiles() ([]string, error) { - miniPath := constants.GetMinipath() - profilesPath := filepath.Join(miniPath, "profiles") - fileInfos, err := ioutil.ReadDir(profilesPath) - if err != nil { - return nil, fmt.Errorf("unable to list in dir: %s \n error: %v", profilesPath, err) - } - - var profiles []string - for _, fileInfo := range fileInfos { - if fileInfo.IsDir() { - profilePath := filepath.Join(profilesPath, fileInfo.Name()) - isValidProfile, err := isValidProfile(profilePath) - if err != nil { - return nil, err - } - if isValidProfile { - profiles = append(profiles, fileInfo.Name()) - } - } - } - return profiles, nil -} - -func isValidProfile(profilePath string) (bool, error) { - fileInfos, err := ioutil.ReadDir(profilePath) - if err != nil { - return false, fmt.Errorf("unable to list in dir: %s \n error: %v", profilePath, err) - } - - hasConfigJSON := false - for _, fileInfo := range fileInfos { - if fileInfo.Name() == "config.json" { - hasConfigJSON = true - } - } - - if !hasConfigJSON { - return false, nil - } - - // TODO: Use constants? - profileConfigPath := filepath.Join(profilePath, "config.json") - bytes, err := ioutil.ReadFile(profileConfigPath) - if err != nil { - return false, fmt.Errorf("unable to read file: %s \n Error: %v", profileConfigPath, err) - } - - var configObject mkConfig.Config - errUnmarshal := json.Unmarshal(bytes, &configObject) - - if errUnmarshal != nil { - return false, fmt.Errorf("could not unmarshal config json to config object: %s \n error: %v", profileConfigPath, err) - } - return true, nil -} diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 3ac9f1f33959..9ad3f7eb073b 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -60,26 +60,33 @@ func runDelete(cmd *cobra.Command, args []string) { exit.UsageT("usage: minikube delete --all") } - profiles, err := cmdcfg.GetAllProfiles() + validProfiles, invalidProfiles, err := pkg_config.ListProfiles() + profilesToDelete := append(validProfiles, invalidProfiles...) + if err != nil { exit.WithError("Error getting profiles to delete", err) } - deleteAllProfiles(profiles) + deleteAllProfiles(profilesToDelete) } else { if len(args) > 0 { exit.UsageT("usage: minikube delete") } profileName := viper.GetString(pkg_config.MachineProfile) - deleteProfile(profileName) + profile, err := pkg_config.LoadProfile(profileName) + + if err != nil { + exit.WithError("Could not load profile", err) + } + deleteProfile(profile) } } } -//TODO Refactor: Return errors? -func deleteProfile(profileName string) { - viper.Set(pkg_config.MachineProfile, profileName) +//TODO Return errors and handle in runDelete? +func deleteProfile(profile *pkg_config.Profile) { + viper.Set(pkg_config.MachineProfile, profile.Name) api, err := machine.NewAPIClient() if err != nil { @@ -89,7 +96,7 @@ func deleteProfile(profileName string) { cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - out.ErrT(out.Sad, "Error loading profile config: {{.error}}", out.V{"name": profileName}) + out.ErrT(out.Sad, "Error loading profile config: {{.error}}", out.V{"name": profile.Name}) } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete @@ -100,7 +107,7 @@ func deleteProfile(profileName string) { if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - out.T(out.Meh, `"{{.name}}" cluster does not exist`, out.V{"name": profileName}) + out.T(out.Meh, `"{{.name}}" cluster does not exist`, out.V{"name": profile.Name}) default: exit.WithError("Failed to delete cluster", err) } @@ -112,12 +119,12 @@ func deleteProfile(profileName string) { if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil { if os.IsNotExist(err) { - out.T(out.Meh, `"{{.profile_name}}" profile does not exist`, out.V{"profile_name": profileName}) + out.T(out.Meh, `"{{.profile_name}}" profile does not exist`, out.V{"profile_name": profile.Name}) os.Exit(0) } exit.WithError("Failed to remove profile", err) } - out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profileName}) + out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile.Name}) machineName := pkg_config.GetMachineName() if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { @@ -125,13 +132,13 @@ func deleteProfile(profileName string) { } } -func deleteAllProfiles(profiles []string) { +func deleteAllProfiles(profiles []*pkg_config.Profile) { for _, profile := range profiles { deleteProfile(profile) } } -// TODO: Return errors? +//TODO Return errors and handle in deleteProfile? func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) { out.T(out.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": kc.KubernetesVersion, "bootstrapper_name": bsName}) clusterBootstrapper, err := getClusterBootstrapper(api, bsName) diff --git a/pkg/minikube/config/profile.go b/pkg/minikube/config/profile.go index bd56d070bd15..f95990b463d2 100644 --- a/pkg/minikube/config/profile.go +++ b/pkg/minikube/config/profile.go @@ -43,7 +43,7 @@ func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile, return nil, nil, err } for _, n := range pDirs { - p, err := loadProfile(n, miniHome...) + p, err := LoadProfile(n, miniHome...) if err != nil { inValidPs = append(inValidPs, p) continue @@ -58,7 +58,7 @@ func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile, } // loadProfile loads type Profile based on its name -func loadProfile(name string, miniHome ...string) (*Profile, error) { +func LoadProfile(name string, miniHome ...string) (*Profile, error) { cfg, err := DefaultLoader.LoadConfigFromFile(name, miniHome...) p := &Profile{ Name: name, From e237a1314dfe7d3a20ac7cd4b908cb447b27c1b5 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 20 Jul 2019 20:02:40 +0200 Subject: [PATCH 17/55] Fixed merge error --- cmd/minikube/cmd/delete.go | 49 ++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 9ad3f7eb073b..b8a26d2b263f 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -48,39 +48,36 @@ associated files.`, // runDelete handles the executes the flow of "minikube delete" func runDelete(cmd *cobra.Command, args []string) { - if len(args) > 0 { - exit.UsageT("usage: minikube delete") - profileFlag, err := cmd.Flags().GetString("profile") - if err != nil { - exit.WithError("Could not get profile flag", err) - } + profileFlag, err := cmd.Flags().GetString("profile") + if err != nil { + exit.WithError("Could not get profile flag", err) + } - if deleteAll { - if profileFlag != constants.DefaultMachineName { - exit.UsageT("usage: minikube delete --all") - } + if deleteAll { + if profileFlag != constants.DefaultMachineName { + exit.UsageT("usage: minikube delete --all") + } - validProfiles, invalidProfiles, err := pkg_config.ListProfiles() - profilesToDelete := append(validProfiles, invalidProfiles...) + validProfiles, invalidProfiles, err := pkg_config.ListProfiles() + profilesToDelete := append(validProfiles, invalidProfiles...) - if err != nil { - exit.WithError("Error getting profiles to delete", err) - } + if err != nil { + exit.WithError("Error getting profiles to delete", err) + } - deleteAllProfiles(profilesToDelete) - } else { - if len(args) > 0 { - exit.UsageT("usage: minikube delete") - } + deleteAllProfiles(profilesToDelete) + } else { + if len(args) > 0 { + exit.UsageT("usage: minikube delete") + } - profileName := viper.GetString(pkg_config.MachineProfile) - profile, err := pkg_config.LoadProfile(profileName) + profileName := viper.GetString(pkg_config.MachineProfile) + profile, err := pkg_config.LoadProfile(profileName) - if err != nil { - exit.WithError("Could not load profile", err) - } - deleteProfile(profile) + if err != nil { + exit.WithError("Could not load profile", err) } + deleteProfile(profile) } } From 45161fabc4d7bee91827d761669e988f7a393c3a Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 23 Jul 2019 00:58:02 +0200 Subject: [PATCH 18/55] Keep deleting when profiles when the deletion of one profile fails Added deletionError struct Added function to handle deletion errors for logging --- cmd/minikube/cmd/delete.go | 103 ++++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 24 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index b8a26d2b263f..ac1fb6756908 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -17,6 +17,7 @@ limitations under the License. package cmd import ( + "fmt" "os" "github.com/docker/machine/libmachine" @@ -46,6 +47,24 @@ associated files.`, Run: runDelete, } +type typeOfError int + +const ( + Fatal typeOfError = 0 + MissingProfile typeOfError = 1 + MissingCluster typeOfError = 2 + Usage typeOfError = 3 +) + +type deletionError struct { + err error + errtype typeOfError +} + +func (error deletionError) Error() string { + return error.err.Error() +} + // runDelete handles the executes the flow of "minikube delete" func runDelete(cmd *cobra.Command, args []string) { profileFlag, err := cmd.Flags().GetString("profile") @@ -65,7 +84,10 @@ func runDelete(cmd *cobra.Command, args []string) { exit.WithError("Error getting profiles to delete", err) } - deleteAllProfiles(profilesToDelete) + errs := deleteAllProfiles(profilesToDelete) + if len(errs) > 0 { + handleDeletionErrors(errs) + } } else { if len(args) > 0 { exit.UsageT("usage: minikube delete") @@ -77,73 +99,106 @@ func runDelete(cmd *cobra.Command, args []string) { if err != nil { exit.WithError("Could not load profile", err) } - deleteProfile(profile) + + err = deleteProfile(profile) + if err != nil { + handleDeletionErrors([]error{err}) + } + } +} + +func handleDeletionErrors(errors []error) { + for _, err := range errors { + deletionError, ok := err.(deletionError) + if ok { + switch deletionError.errtype { + case Fatal: + out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) + case MissingProfile: + out.ErrT(out.Sad, "Error deleting profile: {{.error}}", out.V{"error": deletionError}) + case MissingCluster: + out.T(out.Meh, `Error deleting profile: {{.error}}`, out.V{"error": deletionError}) + case Usage: + out.ErrT(out.Usage, "usage: minikube delete or minikube delete -p foo or minikube delete --all") + default: + out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) + } + } else { + exit.WithError("Could not process errors from failed deletion", nil) + } } + os.Exit(0) } -//TODO Return errors and handle in runDelete? -func deleteProfile(profile *pkg_config.Profile) { +func deleteAllProfiles(profiles []*pkg_config.Profile) []error { + var errs []error + for _, profile := range profiles { + err := deleteProfile(profile) + if err != nil { + errs = append(errs, err) + } + } + return errs +} + +func deleteProfile(profile *pkg_config.Profile) error { viper.Set(pkg_config.MachineProfile, profile.Name) api, err := machine.NewAPIClient() if err != nil { - exit.WithError("Error getting client", err) + return deletionError{fmt.Errorf("error getting client %v", err), Fatal} } defer api.Close() cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - out.ErrT(out.Sad, "Error loading profile config: {{.error}}", out.V{"name": profile.Name}) + return deletionError{fmt.Errorf("error loading profile config: %s", profile.Name), Usage} } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete if err == nil && cc.MachineConfig.VMDriver == constants.DriverNone { - uninstallKubernetes(api, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)) + if err := uninstallKubernetes(api, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil { + return err + } } if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - out.T(out.Meh, `"{{.name}}" cluster does not exist`, out.V{"name": profile.Name}) + return deletionError{fmt.Errorf("%s cluster does not exist", profile.Name), MissingCluster} default: - exit.WithError("Failed to delete cluster", err) + return deletionError{fmt.Errorf("failed to delete cluster %v", err), Fatal} } } if err := cmdUtil.KillMountProcess(); err != nil { - out.FatalT("Failed to kill mount process: {{.error}}", out.V{"error": err}) + return deletionError{fmt.Errorf("failed to kill mount process: %v", err), Fatal} } if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil { if os.IsNotExist(err) { - out.T(out.Meh, `"{{.profile_name}}" profile does not exist`, out.V{"profile_name": profile.Name}) - os.Exit(0) + return deletionError{fmt.Errorf("%s profile does not exist", profile.Name), MissingProfile} } - exit.WithError("Failed to remove profile", err) + return deletionError{fmt.Errorf("failed to remove profile %v", err), Fatal} } out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile.Name}) machineName := pkg_config.GetMachineName() if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { - exit.WithError("update config", err) - } -} - -func deleteAllProfiles(profiles []*pkg_config.Profile) { - for _, profile := range profiles { - deleteProfile(profile) + return deletionError{fmt.Errorf("update config %v", err), Fatal} } + return nil } -//TODO Return errors and handle in deleteProfile? -func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) { +func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) error { out.T(out.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": kc.KubernetesVersion, "bootstrapper_name": bsName}) clusterBootstrapper, err := getClusterBootstrapper(api, bsName) if err != nil { - out.ErrT(out.Empty, "Unable to get bootstrapper: {{.error}}", out.V{"error": err}) + return deletionError{fmt.Errorf("unable to get bootstrapper: %v", err), Fatal} } else if err = clusterBootstrapper.DeleteCluster(kc); err != nil { - out.ErrT(out.Empty, "Failed to delete cluster: {{.error}}", out.V{"error": err}) + return deletionError{fmt.Errorf("failed to delete cluster: %v", err), Fatal} } + return nil } func init() { From cb589740c3f1b630ccdae3de7f066640c0dc9665 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 23 Jul 2019 09:08:16 +0200 Subject: [PATCH 19/55] Added testdata for unit tests Reorganized testdata file structure --- pkg/minikube/config/profile_test.go | 2 +- .../.minikube/profiles/p1/config.json | 0 .../.minikube/profiles/p2/config.json | 0 .../.minikube/profiles/p3_empty/config.json | 0 .../profiles/p4_invalid_file/config.json | 0 .../profiles/p5_partial_config/config.json | 0 .../profile/.minikube/profiles/p1/config.json | 50 +++++++++++++++++++ .../profile/.minikube/profiles/p2/config.json | 49 ++++++++++++++++++ .../.minikube/profiles/p3_empty/config.json | 0 .../profiles/p4_invalid_file/config.json | 1 + .../profiles/p5_partial_config/config.json | 47 +++++++++++++++++ 11 files changed, 148 insertions(+), 1 deletion(-) rename pkg/minikube/config/testdata/{ => delete}/.minikube/profiles/p1/config.json (100%) rename pkg/minikube/config/testdata/{ => delete}/.minikube/profiles/p2/config.json (100%) rename pkg/minikube/config/testdata/{ => delete}/.minikube/profiles/p3_empty/config.json (100%) rename pkg/minikube/config/testdata/{ => delete}/.minikube/profiles/p4_invalid_file/config.json (100%) rename pkg/minikube/config/testdata/{ => delete}/.minikube/profiles/p5_partial_config/config.json (100%) create mode 100644 pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json create mode 100644 pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json create mode 100644 pkg/minikube/config/testdata/profile/.minikube/profiles/p3_empty/config.json create mode 100644 pkg/minikube/config/testdata/profile/.minikube/profiles/p4_invalid_file/config.json create mode 100644 pkg/minikube/config/testdata/profile/.minikube/profiles/p5_partial_config/config.json diff --git a/pkg/minikube/config/profile_test.go b/pkg/minikube/config/profile_test.go index ac96602ee61c..68447ea57aae 100644 --- a/pkg/minikube/config/profile_test.go +++ b/pkg/minikube/config/profile_test.go @@ -22,7 +22,7 @@ import ( ) func TestListProfiles(t *testing.T) { - miniDir, err := filepath.Abs("./testdata/.minikube") + miniDir, err := filepath.Abs("./testdata/profile/.minikube") if err != nil { t.Errorf("error getting dir path for ./testdata/.minikube : %v", err) } diff --git a/pkg/minikube/config/testdata/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json similarity index 100% rename from pkg/minikube/config/testdata/.minikube/profiles/p1/config.json rename to pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json diff --git a/pkg/minikube/config/testdata/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json similarity index 100% rename from pkg/minikube/config/testdata/.minikube/profiles/p2/config.json rename to pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json diff --git a/pkg/minikube/config/testdata/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p3_empty/config.json similarity index 100% rename from pkg/minikube/config/testdata/.minikube/profiles/p3_empty/config.json rename to pkg/minikube/config/testdata/delete/.minikube/profiles/p3_empty/config.json diff --git a/pkg/minikube/config/testdata/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p4_invalid_file/config.json similarity index 100% rename from pkg/minikube/config/testdata/.minikube/profiles/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete/.minikube/profiles/p4_invalid_file/config.json diff --git a/pkg/minikube/config/testdata/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p5_partial_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/.minikube/profiles/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete/.minikube/profiles/p5_partial_config/config.json diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json new file mode 100644 index 000000000000..86699a29bb9e --- /dev/null +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json @@ -0,0 +1,50 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "XhyveDiskDriver": "ahci-hd", + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.75", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json new file mode 100644 index 000000000000..d77e0221d298 --- /dev/null +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "virtualbox", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.99.136", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p3_empty/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p4_invalid_file/config.json new file mode 100644 index 000000000000..9e2e347718f9 --- /dev/null +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p4_invalid_file/config.json @@ -0,0 +1 @@ +invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/profile/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/profile/.minikube/profiles/p5_partial_config/config.json new file mode 100644 index 000000000000..29f62c014986 --- /dev/null +++ b/pkg/minikube/config/testdata/profile/.minikube/profiles/p5_partial_config/config.json @@ -0,0 +1,47 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "XhyveDiskDriver": "ahci-hd", + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file From 6d9ae13990395b03fadbbdbc76d4f6c7a070b4be Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 23 Jul 2019 13:50:36 +0200 Subject: [PATCH 20/55] Fixed Test --- cmd/minikube/cmd/delete.go | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index ac1fb6756908..062d836e6165 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -52,8 +52,7 @@ type typeOfError int const ( Fatal typeOfError = 0 MissingProfile typeOfError = 1 - MissingCluster typeOfError = 2 - Usage typeOfError = 3 + Usage typeOfError = 2 ) type deletionError struct { @@ -95,14 +94,13 @@ func runDelete(cmd *cobra.Command, args []string) { profileName := viper.GetString(pkg_config.MachineProfile) profile, err := pkg_config.LoadProfile(profileName) - - if err != nil { - exit.WithError("Could not load profile", err) - } - - err = deleteProfile(profile) - if err != nil { - handleDeletionErrors([]error{err}) + if err == nil { + err = deleteProfile(profile) + if err != nil { + handleDeletionErrors([]error{err}) + } + } else { + out.ErrT(out.Sad, "Error loading profile: {{.name}} {{.error}}", out.V{"name": profileName, "error": err}) } } } @@ -116,18 +114,15 @@ func handleDeletionErrors(errors []error) { out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) case MissingProfile: out.ErrT(out.Sad, "Error deleting profile: {{.error}}", out.V{"error": deletionError}) - case MissingCluster: - out.T(out.Meh, `Error deleting profile: {{.error}}`, out.V{"error": deletionError}) case Usage: out.ErrT(out.Usage, "usage: minikube delete or minikube delete -p foo or minikube delete --all") default: out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) } } else { - exit.WithError("Could not process errors from failed deletion", nil) + exit.WithError("Could not process errors from failed deletion", err) } } - os.Exit(0) } func deleteAllProfiles(profiles []*pkg_config.Profile) []error { @@ -165,7 +160,7 @@ func deleteProfile(profile *pkg_config.Profile) error { if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - return deletionError{fmt.Errorf("%s cluster does not exist", profile.Name), MissingCluster} + out.T(out.Meh, `"{{.name}}" cluster does not exist`, out.V{"name": profile.Name}) default: return deletionError{fmt.Errorf("failed to delete cluster %v", err), Fatal} } From 6dcb45ad5273fcf26c449f7958af7a51bd0e4f2d Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 23 Jul 2019 17:26:27 +0200 Subject: [PATCH 21/55] Refactor --- cmd/minikube/cmd/delete.go | 49 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 062d836e6165..364a705ba752 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -52,7 +52,8 @@ type typeOfError int const ( Fatal typeOfError = 0 MissingProfile typeOfError = 1 - Usage typeOfError = 2 + MissingCluster typeOfError = 2 + Usage typeOfError = 3 ) type deletionError struct { @@ -94,13 +95,13 @@ func runDelete(cmd *cobra.Command, args []string) { profileName := viper.GetString(pkg_config.MachineProfile) profile, err := pkg_config.LoadProfile(profileName) - if err == nil { - err = deleteProfile(profile) - if err != nil { - handleDeletionErrors([]error{err}) - } - } else { - out.ErrT(out.Sad, "Error loading profile: {{.name}} {{.error}}", out.V{"name": profileName, "error": err}) + if err != nil { + out.ErrT(out.Meh, `"{{.name}}" profile does not exist`, out.V{"name": profileName}) + } + + err = deleteProfile(profile) + if err != nil { + handleDeletionErrors([]error{err}) } } } @@ -111,13 +112,15 @@ func handleDeletionErrors(errors []error) { if ok { switch deletionError.errtype { case Fatal: - out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) + out.FatalT(deletionError.Error()) case MissingProfile: - out.ErrT(out.Sad, "Error deleting profile: {{.error}}", out.V{"error": deletionError}) + out.ErrT(out.Sad, deletionError.Error()) + case MissingCluster: + out.ErrT(out.Meh, deletionError.Error()) case Usage: out.ErrT(out.Usage, "usage: minikube delete or minikube delete -p foo or minikube delete --all") default: - out.FatalT("Error deleting profile: {{.error}}", out.V{"error": deletionError}) + out.FatalT(deletionError.Error()) } } else { exit.WithError("Could not process errors from failed deletion", err) @@ -141,46 +144,52 @@ func deleteProfile(profile *pkg_config.Profile) error { api, err := machine.NewAPIClient() if err != nil { - return deletionError{fmt.Errorf("error getting client %v", err), Fatal} + return deletionError{fmt.Errorf("error deleting profile \"%s\": error getting client %v", profile.Name, err), Fatal} } defer api.Close() cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - return deletionError{fmt.Errorf("error loading profile config: %s", profile.Name), Usage} + return deletionError{fmt.Errorf("error deleting profile \"%s\": error loading profile config: %s", profile.Name, profile.Name), Usage} } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete if err == nil && cc.MachineConfig.VMDriver == constants.DriverNone { if err := uninstallKubernetes(api, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil { - return err + deletionError, ok := err.(deletionError) + if ok { + deletionError.err = fmt.Errorf("error deleting profile \"%s\": %v", profile.Name, err) + return deletionError + } else { + return err + } } } if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - out.T(out.Meh, `"{{.name}}" cluster does not exist`, out.V{"name": profile.Name}) + return deletionError{fmt.Errorf("error deleting profile \"%s\": \"%s\" cluster does not exist", profile.Name, profile.Name), MissingCluster} default: - return deletionError{fmt.Errorf("failed to delete cluster %v", err), Fatal} + return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to delete cluster %v", profile.Name, err), Fatal} } } if err := cmdUtil.KillMountProcess(); err != nil { - return deletionError{fmt.Errorf("failed to kill mount process: %v", err), Fatal} + return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to kill mount process: %v", profile.Name, err), Fatal} } if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil { if os.IsNotExist(err) { - return deletionError{fmt.Errorf("%s profile does not exist", profile.Name), MissingProfile} + return deletionError{fmt.Errorf("error deleting profile \"%s\": %s profile does not exist", profile.Name, profile.Name), MissingProfile} } - return deletionError{fmt.Errorf("failed to remove profile %v", err), Fatal} + return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to remove profile %v", profile.Name, err), Fatal} } out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile.Name}) machineName := pkg_config.GetMachineName() if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { - return deletionError{fmt.Errorf("update config %v", err), Fatal} + return deletionError{fmt.Errorf("error deleting profile \"%s\": update config %v", profile.Name, err), Fatal} } return nil } From 1ef11bfea8f2f054a72b4ea5e91b6afc1c984830 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 23 Jul 2019 17:53:14 +0200 Subject: [PATCH 22/55] Fix test --- cmd/minikube/cmd/delete.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 364a705ba752..3a01e656e232 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -160,9 +160,8 @@ func deleteProfile(profile *pkg_config.Profile) error { if ok { deletionError.err = fmt.Errorf("error deleting profile \"%s\": %v", profile.Name, err) return deletionError - } else { - return err } + return err } } From 96ef740782e61659f7e4ece287fc43d78c1375c5 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Wed, 24 Jul 2019 15:01:52 +0200 Subject: [PATCH 23/55] Improved logging --- cmd/minikube/cmd/delete.go | 44 +++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 3a01e656e232..f573eae02a4b 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -22,6 +22,7 @@ import ( "github.com/docker/machine/libmachine" "github.com/docker/machine/libmachine/mcnerror" + "github.com/golang/glog" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -53,7 +54,6 @@ const ( Fatal typeOfError = 0 MissingProfile typeOfError = 1 MissingCluster typeOfError = 2 - Usage typeOfError = 3 ) type deletionError struct { @@ -107,20 +107,48 @@ func runDelete(cmd *cobra.Command, args []string) { } func handleDeletionErrors(errors []error) { + if len(errors) == 1 { + handleSingleDeletionError(errors[0]) + } else { + handleMultipleDeletionErrors(errors) + } +} + +func handleSingleDeletionError(err error) { + deletionError, ok := err.(deletionError) + + if ok { + switch deletionError.errtype { + case Fatal: + out.FatalT(deletionError.Error()) + case MissingProfile: + out.ErrT(out.Sad, deletionError.Error()) + case MissingCluster: + out.ErrT(out.Meh, deletionError.Error()) + default: + out.FatalT(deletionError.Error()) + } + } else { + exit.WithError("Could not process error from failed deletion", err) + } +} + +func handleMultipleDeletionErrors(errors []error) { + out.ErrT(out.Sad, "Multiple errors deleting profiles") + for _, err := range errors { deletionError, ok := err.(deletionError) + if ok { switch deletionError.errtype { case Fatal: - out.FatalT(deletionError.Error()) + glog.Errorln(deletionError.Error()) case MissingProfile: - out.ErrT(out.Sad, deletionError.Error()) + glog.Errorln(deletionError.Error()) case MissingCluster: - out.ErrT(out.Meh, deletionError.Error()) - case Usage: - out.ErrT(out.Usage, "usage: minikube delete or minikube delete -p foo or minikube delete --all") + glog.Errorln(deletionError.Error()) default: - out.FatalT(deletionError.Error()) + glog.Errorln(deletionError.Error()) } } else { exit.WithError("Could not process errors from failed deletion", err) @@ -150,7 +178,7 @@ func deleteProfile(profile *pkg_config.Profile) error { cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - return deletionError{fmt.Errorf("error deleting profile \"%s\": error loading profile config: %s", profile.Name, profile.Name), Usage} + return deletionError{fmt.Errorf("error deleting profile \"%s\": error loading profile config: %v", profile.Name, err), MissingProfile} } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete From d4d8cc43f011a1e216d3a473c208d70532f600c0 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Wed, 24 Jul 2019 17:28:57 +0200 Subject: [PATCH 24/55] Refactor error init --- cmd/minikube/cmd/delete.go | 161 ++++++++++++++++++++----------------- 1 file changed, 87 insertions(+), 74 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index f573eae02a4b..166b7449e25d 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -56,13 +56,13 @@ const ( MissingCluster typeOfError = 2 ) -type deletionError struct { - err error - errtype typeOfError +type DeletionError struct { + Err error + Errtype typeOfError } -func (error deletionError) Error() string { - return error.err.Error() +func (error DeletionError) Error() string { + return error.Err.Error() } // runDelete handles the executes the flow of "minikube delete" @@ -84,9 +84,9 @@ func runDelete(cmd *cobra.Command, args []string) { exit.WithError("Error getting profiles to delete", err) } - errs := deleteAllProfiles(profilesToDelete) + errs := DeleteAllProfiles(profilesToDelete) if len(errs) > 0 { - handleDeletionErrors(errs) + HandleDeletionErrors(errs) } } else { if len(args) > 0 { @@ -99,67 +99,17 @@ func runDelete(cmd *cobra.Command, args []string) { out.ErrT(out.Meh, `"{{.name}}" profile does not exist`, out.V{"name": profileName}) } - err = deleteProfile(profile) + err = DeleteProfile(profile) if err != nil { - handleDeletionErrors([]error{err}) + HandleDeletionErrors([]error{err}) } } } -func handleDeletionErrors(errors []error) { - if len(errors) == 1 { - handleSingleDeletionError(errors[0]) - } else { - handleMultipleDeletionErrors(errors) - } -} - -func handleSingleDeletionError(err error) { - deletionError, ok := err.(deletionError) - - if ok { - switch deletionError.errtype { - case Fatal: - out.FatalT(deletionError.Error()) - case MissingProfile: - out.ErrT(out.Sad, deletionError.Error()) - case MissingCluster: - out.ErrT(out.Meh, deletionError.Error()) - default: - out.FatalT(deletionError.Error()) - } - } else { - exit.WithError("Could not process error from failed deletion", err) - } -} - -func handleMultipleDeletionErrors(errors []error) { - out.ErrT(out.Sad, "Multiple errors deleting profiles") - - for _, err := range errors { - deletionError, ok := err.(deletionError) - - if ok { - switch deletionError.errtype { - case Fatal: - glog.Errorln(deletionError.Error()) - case MissingProfile: - glog.Errorln(deletionError.Error()) - case MissingCluster: - glog.Errorln(deletionError.Error()) - default: - glog.Errorln(deletionError.Error()) - } - } else { - exit.WithError("Could not process errors from failed deletion", err) - } - } -} - -func deleteAllProfiles(profiles []*pkg_config.Profile) []error { +func DeleteAllProfiles(profiles []*pkg_config.Profile) []error { var errs []error for _, profile := range profiles { - err := deleteProfile(profile) + err := DeleteProfile(profile) if err != nil { errs = append(errs, err) } @@ -167,26 +117,29 @@ func deleteAllProfiles(profiles []*pkg_config.Profile) []error { return errs } -func deleteProfile(profile *pkg_config.Profile) error { +func DeleteProfile(profile *pkg_config.Profile) error { viper.Set(pkg_config.MachineProfile, profile.Name) api, err := machine.NewAPIClient() if err != nil { - return deletionError{fmt.Errorf("error deleting profile \"%s\": error getting client %v", profile.Name, err), Fatal} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("error getting client %v", err)) + return DeletionError{Err: delErr, Errtype: Fatal} } defer api.Close() cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - return deletionError{fmt.Errorf("error deleting profile \"%s\": error loading profile config: %v", profile.Name, err), MissingProfile} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("error loading profile config: %v", err)) + return DeletionError{Err: delErr, Errtype: MissingProfile} } // In the case of "none", we want to uninstall Kubernetes as there is no VM to delete if err == nil && cc.MachineConfig.VMDriver == constants.DriverNone { if err := uninstallKubernetes(api, cc.KubernetesConfig, viper.GetString(cmdcfg.Bootstrapper)); err != nil { - deletionError, ok := err.(deletionError) + deletionError, ok := err.(DeletionError) if ok { - deletionError.err = fmt.Errorf("error deleting profile \"%s\": %v", profile.Name, err) + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("%v", err)) + deletionError.Err = delErr return deletionError } return err @@ -196,42 +149,102 @@ func deleteProfile(profile *pkg_config.Profile) error { if err = cluster.DeleteHost(api); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - return deletionError{fmt.Errorf("error deleting profile \"%s\": \"%s\" cluster does not exist", profile.Name, profile.Name), MissingCluster} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("\"%s\" cluster does not exist", profile.Name)) + return DeletionError{Err: delErr, Errtype: MissingCluster} default: - return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to delete cluster %v", profile.Name, err), Fatal} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("failed to delete cluster %v", err)) + return DeletionError{Err: delErr, Errtype: Fatal} } } if err := cmdUtil.KillMountProcess(); err != nil { - return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to kill mount process: %v", profile.Name, err), Fatal} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("failed to kill mount process: %v", err)) + return DeletionError{Err: delErr, Errtype: Fatal} } if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil { if os.IsNotExist(err) { - return deletionError{fmt.Errorf("error deleting profile \"%s\": %s profile does not exist", profile.Name, profile.Name), MissingProfile} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("\"%s\" profile does not exist", profile.Name)) + return DeletionError{Err: delErr, Errtype: MissingProfile} } - return deletionError{fmt.Errorf("error deleting profile \"%s\": failed to remove profile %v", profile.Name, err), Fatal} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("failed to remove profile %v", err)) + return DeletionError{Err: delErr, Errtype: Fatal} } out.T(out.Crushed, `The "{{.cluster_name}}" cluster has been deleted.`, out.V{"cluster_name": profile.Name}) machineName := pkg_config.GetMachineName() if err := pkgutil.DeleteKubeConfigContext(constants.KubeconfigPath, machineName); err != nil { - return deletionError{fmt.Errorf("error deleting profile \"%s\": update config %v", profile.Name, err), Fatal} + delErr := profileDeletionErr(profile.Name, fmt.Sprintf("update config %v", err)) + return DeletionError{Err: delErr, Errtype: Fatal} } return nil } +func profileDeletionErr(profileName string, additionalInfo string) error { + return fmt.Errorf("error deleting profile \"%s\": %s", profileName, additionalInfo) +} + func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsName string) error { out.T(out.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": kc.KubernetesVersion, "bootstrapper_name": bsName}) clusterBootstrapper, err := getClusterBootstrapper(api, bsName) if err != nil { - return deletionError{fmt.Errorf("unable to get bootstrapper: %v", err), Fatal} + return DeletionError{Err: fmt.Errorf("unable to get bootstrapper: %v", err), Errtype: Fatal} } else if err = clusterBootstrapper.DeleteCluster(kc); err != nil { - return deletionError{fmt.Errorf("failed to delete cluster: %v", err), Fatal} + return DeletionError{Err: fmt.Errorf("failed to delete cluster: %v", err), Errtype: Fatal} } return nil } +func HandleDeletionErrors(errors []error) { + if len(errors) == 1 { + handleSingleDeletionError(errors[0]) + } else { + handleMultipleDeletionErrors(errors) + } +} + +func handleSingleDeletionError(err error) { + deletionError, ok := err.(DeletionError) + + if ok { + switch deletionError.Errtype { + case Fatal: + out.FatalT(deletionError.Error()) + case MissingProfile: + out.ErrT(out.Sad, deletionError.Error()) + case MissingCluster: + out.ErrT(out.Meh, deletionError.Error()) + default: + out.FatalT(deletionError.Error()) + } + } else { + exit.WithError("Could not process error from failed deletion", err) + } +} + +func handleMultipleDeletionErrors(errors []error) { + out.ErrT(out.Sad, "Multiple errors deleting profiles") + + for _, err := range errors { + deletionError, ok := err.(DeletionError) + + if ok { + switch deletionError.Errtype { + case Fatal: + glog.Errorln(deletionError.Error()) + case MissingProfile: + glog.Errorln(deletionError.Error()) + case MissingCluster: + glog.Errorln(deletionError.Error()) + default: + glog.Errorln(deletionError.Error()) + } + } else { + exit.WithError("Could not process errors from failed deletion", err) + } + } +} + func init() { deleteCmd.Flags().BoolVar(&deleteAll, "all", false, "Set flag to delete all profiles") RootCmd.AddCommand(deleteCmd) From 6f81089dfb4b7055bf59a335fe708be4acc6fa8e Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Wed, 24 Jul 2019 20:35:58 +0200 Subject: [PATCH 25/55] Fixed review findings --- cmd/minikube/cmd/delete.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 166b7449e25d..cc50c74ca742 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -229,16 +229,7 @@ func handleMultipleDeletionErrors(errors []error) { deletionError, ok := err.(DeletionError) if ok { - switch deletionError.Errtype { - case Fatal: - glog.Errorln(deletionError.Error()) - case MissingProfile: - glog.Errorln(deletionError.Error()) - case MissingCluster: - glog.Errorln(deletionError.Error()) - default: - glog.Errorln(deletionError.Error()) - } + glog.Errorln(deletionError.Error()) } else { exit.WithError("Could not process errors from failed deletion", err) } From a4fd88514b990a22741b7c959b584f3782e209ba Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 13:15:27 +0200 Subject: [PATCH 26/55] Added valid configs for delete_test --- .../delete/.minikube/machines/p1/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p1/hyperkit.json | 1 + .../delete/.minikube/machines/p2/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p2/hyperkit.json | 1 + .../delete/.minikube/profiles/p1/config.json | 3 +- .../delete/.minikube/profiles/p2/config.json | 4 +- 6 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json create mode 100644 pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json new file mode 100644 index 000000000000..213451c654f4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p1", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p1" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json new file mode 100644 index 000000000000..7882c7a13e5d --- /dev/null +++ b/pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p1/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json new file mode 100644 index 000000000000..da03857efb46 --- /dev/null +++ b/pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.51", + "MachineName": "p2", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p2/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p2" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json new file mode 100644 index 000000000000..e399e66bf73d --- /dev/null +++ b/pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p2/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json index 86699a29bb9e..00655266e652 100644 --- a/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json +++ b/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json @@ -9,7 +9,6 @@ "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], - "XhyveDiskDriver": "ahci-hd", "DockerEnv": null, "InsecureRegistry": null, "RegistryMirror": null, @@ -30,7 +29,7 @@ }, "KubernetesConfig": { "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.75", + "NodeIP": "192.168.64.50", "NodePort": 8443, "NodeName": "minikube", "APIServerName": "minikubeCA", diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json index d77e0221d298..77529a124fea 100644 --- a/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json +++ b/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json @@ -5,7 +5,7 @@ "Memory": 2000, "CPUs": 2, "DiskSize": 20000, - "VMDriver": "virtualbox", + "VMDriver": "hyperkit", "ContainerRuntime": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], @@ -29,7 +29,7 @@ }, "KubernetesConfig": { "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.99.136", + "NodeIP": "192.168.64.51", "NodePort": 8443, "NodeName": "minikube", "APIServerName": "minikubeCA", From d7d05b7494cd0ff93623bd0bd6ed3d8dbf7a97ca Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 16:33:46 +0200 Subject: [PATCH 27/55] Added more testdata --- .../.minikube/machines/p1/config.json | 0 .../.minikube/machines/p1/hyperkit.json | 0 .../machines/p10_invalid_file/config.json | 1 + .../machines/p10_invalid_file/hyperkit.json | 1 + .../machines/p11_partial_config/config.json | 72 +++++++++++++++++ .../machines/p11_partial_config/hyperkit.json | 1 + .../.minikube/machines/p2/config.json | 0 .../.minikube/machines/p2/hyperkit.json | 0 .../.minikube/machines/p3/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p3/hyperkit.json | 1 + .../.minikube/machines/p4/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p4/hyperkit.json | 1 + .../.minikube/machines/p5/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p5/hyperkit.json | 1 + .../.minikube/machines/p7_empty}/config.json | 0 .../.minikube/machines/p7_empty/hyperkit.json | 0 .../machines/p8_empty_config/config.json | 0 .../machines/p8_empty_config/hyperkit.json | 1 + .../machines/p9_empty_driver/config.json | 80 +++++++++++++++++++ .../machines/p9_empty_driver/hyperkit.json | 0 .../.minikube/profiles/p1/config.json | 0 .../.minikube/profiles/p10/config.json | 49 ++++++++++++ .../.minikube/profiles/p11/config.json | 49 ++++++++++++ .../.minikube/profiles/p2/config.json | 0 .../.minikube/profiles/p3_empty/config.json | 0 .../profiles/p4_invalid_file/config.json | 0 .../profiles/p5_partial_config/config.json | 0 .../.minikube/profiles/p6/config.json | 49 ++++++++++++ .../.minikube/profiles/p7/config.json | 49 ++++++++++++ .../.minikube/profiles/p8/config.json | 49 ++++++++++++ .../.minikube/profiles/p9/config.json | 49 ++++++++++++ .../.minikube/machines/p1/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p1/hyperkit.json | 1 + .../machines/p10_invalid_file/config.json | 1 + .../machines/p10_invalid_file/hyperkit.json | 1 + .../machines/p11_partial_config/config.json | 72 +++++++++++++++++ .../machines/p11_partial_config/hyperkit.json | 1 + .../.minikube/machines/p2/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p2/hyperkit.json | 1 + .../.minikube/machines/p3/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p3/hyperkit.json | 1 + .../.minikube/machines/p4/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p4/hyperkit.json | 1 + .../.minikube/machines/p5/config.json | 80 +++++++++++++++++++ .../.minikube/machines/p5/hyperkit.json | 1 + .../.minikube/machines/p7_empty/config.json | 0 .../.minikube/machines/p7_empty/hyperkit.json | 0 .../machines/p8_empty_config/config.json | 0 .../machines/p8_empty_config/hyperkit.json | 1 + .../machines/p9_empty_driver/config.json | 80 +++++++++++++++++++ .../machines/p9_empty_driver/hyperkit.json | 0 .../.minikube/profiles/p1/config.json | 49 ++++++++++++ .../.minikube/profiles/p10/config.json | 49 ++++++++++++ .../.minikube/profiles/p11/config.json | 49 ++++++++++++ .../.minikube/profiles/p2/config.json | 49 ++++++++++++ .../.minikube/profiles/p3_empty/config.json | 0 .../profiles/p4_invalid_file/config.json | 1 + .../profiles/p5_partial_config/config.json | 47 +++++++++++ .../.minikube/profiles/p6/config.json | 49 ++++++++++++ .../.minikube/profiles/p7/config.json | 49 ++++++++++++ .../.minikube/profiles/p8/config.json | 49 ++++++++++++ .../.minikube/profiles/p9/config.json | 49 ++++++++++++ 62 files changed, 1694 insertions(+) rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/machines/p1/config.json (100%) rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/machines/p1/hyperkit.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/machines/p2/config.json (100%) rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/machines/p2/hyperkit.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json rename pkg/minikube/config/testdata/{delete/.minikube/profiles/p3_empty => delete-all/.minikube/machines/p7_empty}/config.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/profiles/p1/config.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/profiles/p2/config.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_empty/config.json rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/profiles/p4_invalid_file/config.json (100%) rename pkg/minikube/config/testdata/{delete => delete-all}/.minikube/profiles/p5_partial_config/config.json (100%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/machines/p1/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/machines/p1/hyperkit.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json new file mode 100644 index 000000000000..acbaeb7304c0 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json @@ -0,0 +1,72 @@ +{ + "ConfigVersion": 3, + "Driver": { + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p11/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p11/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p11/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json new file mode 100644 index 000000000000..6bc256048f05 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p11/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p11/tty,log=/Users/marekschwarz/.minikube/machines/p11/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p11/bzImage,/Users/marekschwarz/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p11/tty,log=/Users/marekschwarz/.minikube/machines/p11/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p11/bzImage,/Users/marekschwarz/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/machines/p2/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json diff --git a/pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/machines/p2/hyperkit.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json new file mode 100644 index 000000000000..2ecf37cab508 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.52", + "MachineName": "p3", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p3/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p3" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json new file mode 100644 index 000000000000..216b692bdaa1 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p3/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p3/tty,log=/Users/marekschwarz/.minikube/machines/p3/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p3/bzImage,/Users/marekschwarz/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p3/tty,log=/Users/marekschwarz/.minikube/machines/p3/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p3/bzImage,/Users/marekschwarz/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json new file mode 100644 index 000000000000..f54271c5f327 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.53", + "MachineName": "p4", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p4/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p4/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p4/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p4" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json new file mode 100644 index 000000000000..d77cca2ca105 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p4/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json new file mode 100644 index 000000000000..23bff535ec33 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.54", + "MachineName": "p5", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p5/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p5" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json new file mode 100644 index 000000000000..927b1447993c --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p5/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/profiles/p3_empty/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json new file mode 100644 index 000000000000..be5e73f904dd --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p8/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p8/tty,log=/Users/marekschwarz/.minikube/machines/p8/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p8/bzImage,/Users/marekschwarz/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p8/tty,log=/Users/marekschwarz/.minikube/machines/p8/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p8/bzImage,/Users/marekschwarz/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json new file mode 100644 index 000000000000..62837eed54f1 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.58", + "MachineName": "p9", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p9/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p9/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p9/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p9" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/profiles/p1/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json new file mode 100644 index 000000000000..ea47981d2928 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.59", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json new file mode 100644 index 000000000000..789b9b55576f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.60", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/profiles/p2/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_empty/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_invalid_file/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/profiles/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_invalid_file/config.json diff --git a/pkg/minikube/config/testdata/delete/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_partial_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete/.minikube/profiles/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_partial_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json new file mode 100644 index 000000000000..1e0980752aa7 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.55", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json new file mode 100644 index 000000000000..5891cb15bf20 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.56", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json new file mode 100644 index 000000000000..a1557f6df1b4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.57", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json new file mode 100644 index 000000000000..9a55310acceb --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.58", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json new file mode 100644 index 000000000000..213451c654f4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p1", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p1" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json new file mode 100644 index 000000000000..7882c7a13e5d --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p1/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json new file mode 100644 index 000000000000..efc4280179bb --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json @@ -0,0 +1,72 @@ +{ + "ConfigVersion": 3, + "Driver": { + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p11/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json new file mode 100644 index 000000000000..a924f25ad0de --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p11/bzImage","initrd":"/Users/someuser/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring -f kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json new file mode 100644 index 000000000000..da03857efb46 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.51", + "MachineName": "p2", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p2/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p2" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json new file mode 100644 index 000000000000..e399e66bf73d --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p2/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json new file mode 100644 index 000000000000..2ecf37cab508 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.52", + "MachineName": "p3", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p3/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p3" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json new file mode 100644 index 000000000000..38b7db487f51 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3/bzImage","initrd":"/Users/someuser/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring -f kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json new file mode 100644 index 000000000000..5eedd16a38ca --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.53", + "MachineName": "p4", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p4" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json new file mode 100644 index 000000000000..d77cca2ca105 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p4/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json new file mode 100644 index 000000000000..23bff535ec33 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.54", + "MachineName": "p5", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p5/id_rsa", + "StorePath": "/Users/marekschwarz/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", + "BootKernel": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/bzImage", + "BootInitrd": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/marekschwarz/.minikube", + "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/marekschwarz/.minikube" + } + }, + "Name": "p5" +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json new file mode 100644 index 000000000000..b1b136f59d95 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json new file mode 100644 index 000000000000..2b7fd6fc9442 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8/bzImage","initrd":"/Users/someuser/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring -f kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json new file mode 100644 index 000000000000..b6f1aa2fc4e7 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.58", + "MachineName": "p9", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p9/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p9" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json new file mode 100644 index 000000000000..00655266e652 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.50", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json new file mode 100644 index 000000000000..ea47981d2928 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.59", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json new file mode 100644 index 000000000000..789b9b55576f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.60", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json new file mode 100644 index 000000000000..77529a124fea --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.51", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json new file mode 100644 index 000000000000..9e2e347718f9 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json @@ -0,0 +1 @@ +invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json new file mode 100644 index 000000000000..29f62c014986 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json @@ -0,0 +1,47 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "XhyveDiskDriver": "ahci-hd", + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json new file mode 100644 index 000000000000..1e0980752aa7 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.55", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json new file mode 100644 index 000000000000..5891cb15bf20 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.56", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json new file mode 100644 index 000000000000..a1557f6df1b4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.57", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json new file mode 100644 index 000000000000..9a55310acceb --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.58", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} From 1d9a61f31e6bc00a3173534b6a6827cb0c84f840 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 18:54:19 +0200 Subject: [PATCH 28/55] Changed username --- .../.minikube/machines/p1/config.json | 28 +++++++++---------- .../.minikube/machines/p1/hyperkit.json | 2 +- .../machines/p11_partial_config/config.json | 18 ++++++------ .../machines/p11_partial_config/hyperkit.json | 2 +- .../.minikube/machines/p2/config.json | 28 +++++++++---------- .../.minikube/machines/p2/hyperkit.json | 2 +- .../.minikube/machines/p3/config.json | 28 +++++++++---------- .../.minikube/machines/p3/hyperkit.json | 2 +- .../.minikube/machines/p4/config.json | 28 +++++++++---------- .../.minikube/machines/p4/hyperkit.json | 2 +- .../.minikube/machines/p5/config.json | 28 +++++++++---------- .../.minikube/machines/p5/hyperkit.json | 2 +- .../machines/p8_empty_config/hyperkit.json | 2 +- .../machines/p9_empty_driver/config.json | 28 +++++++++---------- .../.minikube/machines/p1/config.json | 28 +++++++++---------- .../.minikube/machines/p1/hyperkit.json | 2 +- .../.minikube/machines/p2/config.json | 28 +++++++++---------- .../.minikube/machines/p2/hyperkit.json | 2 +- .../.minikube/machines/p3/config.json | 28 +++++++++---------- .../.minikube/machines/p4/hyperkit.json | 2 +- .../.minikube/machines/p5/config.json | 28 +++++++++---------- .../.minikube/machines/p5/hyperkit.json | 2 +- 22 files changed, 160 insertions(+), 160 deletions(-) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json index 213451c654f4..90a026a01c51 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json @@ -5,12 +5,12 @@ "MachineName": "p1", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p1/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p1" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json index 7882c7a13e5d..df350fb656fe 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p1/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p1/bzImage","initrd":"/Users/someuser/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring -f kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json index acbaeb7304c0..efc4280179bb 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json @@ -3,8 +3,8 @@ "Driver": { "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p11/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p11/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", @@ -15,8 +15,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p11/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p11/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -58,15 +58,15 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json index 6bc256048f05..a924f25ad0de 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p11/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p11/tty,log=/Users/marekschwarz/.minikube/machines/p11/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p11/bzImage,/Users/marekschwarz/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p11/tty,log=/Users/marekschwarz/.minikube/machines/p11/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p11/bzImage,/Users/marekschwarz/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p11/bzImage","initrd":"/Users/someuser/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring -f kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json index da03857efb46..d6acef4d4f27 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json @@ -5,12 +5,12 @@ "MachineName": "p2", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p2/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p2" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json index e399e66bf73d..4520dd1642e7 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p2/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p2/bzImage","initrd":"/Users/someuser/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring -f kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json index 2ecf37cab508..84e8fbfaaa4a 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json @@ -5,12 +5,12 @@ "MachineName": "p3", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p3/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p3" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json index 216b692bdaa1..38b7db487f51 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p3/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p3/tty,log=/Users/marekschwarz/.minikube/machines/p3/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p3/bzImage,/Users/marekschwarz/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p3/tty,log=/Users/marekschwarz/.minikube/machines/p3/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p3/bzImage,/Users/marekschwarz/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3/bzImage","initrd":"/Users/someuser/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring -f kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json index f54271c5f327..5eedd16a38ca 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json @@ -5,12 +5,12 @@ "MachineName": "p4", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p4/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p4/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p4/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p4" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json index d77cca2ca105..8489ab064669 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p4/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4/bzImage","initrd":"/Users/someuser/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring -f kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json index 23bff535ec33..4d058d4b1f04 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json @@ -5,12 +5,12 @@ "MachineName": "p5", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p5/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p5/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p5" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json index 927b1447993c..70960a3aa5f0 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p5/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring -f kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json index be5e73f904dd..2b7fd6fc9442 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p8/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p8/tty,log=/Users/marekschwarz/.minikube/machines/p8/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p8/bzImage,/Users/marekschwarz/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p8/tty,log=/Users/marekschwarz/.minikube/machines/p8/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p8/bzImage,/Users/marekschwarz/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8/bzImage","initrd":"/Users/someuser/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring -f kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json index 62837eed54f1..b6f1aa2fc4e7 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json @@ -5,12 +5,12 @@ "MachineName": "p9", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p9/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p9/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p9/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p9/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p9" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json index 213451c654f4..90a026a01c51 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json @@ -5,12 +5,12 @@ "MachineName": "p1", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p1/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p1/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p1" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json index 7882c7a13e5d..df350fb656fe 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p1/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p1/tty,log=/Users/marekschwarz/.minikube/machines/p1/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p1/bzImage,/Users/marekschwarz/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p1/bzImage","initrd":"/Users/someuser/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring -f kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json index da03857efb46..d6acef4d4f27 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json @@ -5,12 +5,12 @@ "MachineName": "p2", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p2/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p2/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p2" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json index e399e66bf73d..4520dd1642e7 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p2/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p2/tty,log=/Users/marekschwarz/.minikube/machines/p2/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p2/bzImage,/Users/marekschwarz/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p2/bzImage","initrd":"/Users/someuser/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring -f kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json index 2ecf37cab508..84e8fbfaaa4a 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json @@ -5,12 +5,12 @@ "MachineName": "p3", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p3/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p3/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p3" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json index d77cca2ca105..8489ab064669 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/marekschwarz/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/marekschwarz/.minikube/machines/p4/bzImage","initrd":"/Users/marekschwarz/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/marekschwarz/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p4/tty,log=/Users/marekschwarz/.minikube/machines/p4/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p4/bzImage,/Users/marekschwarz/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} \ No newline at end of file +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4/bzImage","initrd":"/Users/someuser/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring -f kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json index 23bff535ec33..4d058d4b1f04 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json @@ -5,12 +5,12 @@ "MachineName": "p5", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/marekschwarz/.minikube/machines/p5/id_rsa", - "StorePath": "/Users/marekschwarz/.minikube", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p5/id_rsa", + "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/marekschwarz/.minikube/cache/iso/minikube-v1.2.0.iso", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", "DiskSize": 20000, "CPU": 2, "Memory": 2000, @@ -18,8 +18,8 @@ "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/bzImage", - "BootInitrd": "/Users/marekschwarz/.minikube/machines/p5/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -62,19 +62,19 @@ "IsExperimental": false }, "AuthOptions": { - "CertDir": "/Users/marekschwarz/.minikube", - "CaCertPath": "/Users/marekschwarz/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/marekschwarz/.minikube/certs/ca-key.pem", + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", "CaCertRemotePath": "", - "ServerCertPath": "/Users/marekschwarz/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/marekschwarz/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/marekschwarz/.minikube/certs/key.pem", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", "ServerCertRemotePath": "", "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/marekschwarz/.minikube/certs/cert.pem", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", "ServerCertSANs": null, - "StorePath": "/Users/marekschwarz/.minikube" + "StorePath": "/Users/someuser/.minikube" } }, "Name": "p5" -} \ No newline at end of file +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json index b1b136f59d95..70960a3aa5f0 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring","-f","kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/marekschwarz/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/marekschwarz/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/marekschwarz/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/marekschwarz/.minikube/machines/p5/tty,log=/Users/marekschwarz/.minikube/machines/p5/console-ring -f kexec,/Users/marekschwarz/.minikube/machines/p5/bzImage,/Users/marekschwarz/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring -f kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} From 59eb97408855474f5badfaef166c9a8d522a8612 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 22:44:37 +0200 Subject: [PATCH 29/55] Fixed testdata --- .../machines/p11_partial_config/config.json | 8 ++++---- .../.minikube/machines/p3/hyperkit.json | 1 - .../.minikube/machines/{p3 => p3_empty}/config.json | 12 ++++++------ .../.minikube/machines/p3_empty/hyperkit.json | 1 + .../.minikube/machines/p4/hyperkit.json | 1 - .../machines/{p4 => p4_invalid_file}/config.json | 12 ++++++------ .../.minikube/machines/p4_invalid_file/hyperkit.json | 1 + .../.minikube/machines/p5/hyperkit.json | 1 - .../machines/{p5 => p5_partial_config}/config.json | 12 ++++++------ .../machines/p5_partial_config/hyperkit.json | 1 + .../.minikube/machines/p8_empty_config/hyperkit.json | 2 +- .../.minikube/machines/p9_empty_driver/config.json | 12 ++++++------ .../profiles/{p10 => p10_invalid_file}/config.json | 0 .../profiles/{p11 => p11_partial_config}/config.json | 0 .../.minikube/profiles/{p7 => p7_empty}/config.json | 0 .../profiles/{p8 => p8_empty_config}/config.json | 0 .../profiles/{p9 => p9_empty_driver}/config.json | 0 17 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/machines/{p3 => p3_empty}/config.json (87%) create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/machines/{p4 => p4_invalid_file}/config.json (86%) create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/machines/{p5 => p5_partial_config}/config.json (86%) create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p10 => p10_invalid_file}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p11 => p11_partial_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p7 => p7_empty}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p8 => p8_empty_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p9 => p9_empty_driver}/config.json (100%) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json index efc4280179bb..b95393d6f0da 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json @@ -3,7 +3,7 @@ "Driver": { "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p11/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p11_partial_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -11,12 +11,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11_partial_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json deleted file mode 100644 index 38b7db487f51..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3/bzImage","initrd":"/Users/someuser/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring -f kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json similarity index 87% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json index 84e8fbfaaa4a..e387da62d9a3 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.52", - "MachineName": "p3", + "MachineName": "p3_empty", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_empty/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p3" + "Name": "p3_empty" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json new file mode 100644 index 000000000000..31f09ed93eef --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3_empty","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3_empty/bzImage","initrd":"/Users/someuser/.minikube/machines/p3_empty/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3_empty/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3_empty/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring -f kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json deleted file mode 100644 index 8489ab064669..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4/bzImage","initrd":"/Users/someuser/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring -f kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json similarity index 86% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json index 5eedd16a38ca..cf7f38defac8 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.53", - "MachineName": "p4", + "MachineName": "p4_invalid_file", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_invalid_file/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p4" + "Name": "p4_invalid_file" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json new file mode 100644 index 000000000000..281dcf58222c --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4_invalid_file","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4_invalid_file/bzImage","initrd":"/Users/someuser/.minikube/machines/p4_invalid_file/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring -f kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json deleted file mode 100644 index 70960a3aa5f0..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring -f kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json similarity index 86% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json index 4d058d4b1f04..bf01fde29e19 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.54", - "MachineName": "p5", + "MachineName": "p5_partial_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p5/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p5_partial_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p5" + "Name": "p5_partial_config" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json new file mode 100644 index 000000000000..8ac2881b790f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5_partial_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5_partial_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p5_partial_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json index 2b7fd6fc9442..d7b31cea7b24 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8/bzImage","initrd":"/Users/someuser/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring -f kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8_empty_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8_empty_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p8_empty_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json index b6f1aa2fc4e7..1f5e9198155d 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.58", - "MachineName": "p9", + "MachineName": "p9_empty_driver", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p9/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p9_empty_driver/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9_empty_driver", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p9" + "Name": "p9_empty_driver" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10_invalid_file/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10_invalid_file/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11_partial_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11_partial_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_empty_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_empty_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json From fa0cdbf64b0d48d15eb742e7f636f2dc15fcf5c3 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 22:46:35 +0200 Subject: [PATCH 30/55] Fixed testdata --- .../machines/p11_partial_config/config.json | 8 ++++---- .../delete-all/.minikube/machines/p3/hyperkit.json | 1 - .../.minikube/machines/{p3 => p3_empty}/config.json | 12 ++++++------ .../.minikube/machines/p3_empty/hyperkit.json | 1 + .../delete-all/.minikube/machines/p4/hyperkit.json | 1 - .../machines/{p4 => p4_invalid_file}/config.json | 12 ++++++------ .../.minikube/machines/p4_invalid_file/hyperkit.json | 1 + .../delete-all/.minikube/machines/p5/hyperkit.json | 1 - .../machines/{p5 => p5_partial_config}/config.json | 12 ++++++------ .../machines/p5_partial_config/hyperkit.json | 1 + .../.minikube/machines/p8_empty_config/hyperkit.json | 2 +- .../.minikube/machines/p9_empty_driver/config.json | 12 ++++++------ .../profiles/{p10 => p10_invalid_file}/config.json | 0 .../profiles/{p11 => p11_partial_config}/config.json | 0 .../.minikube/profiles/{p7 => p7_empty}/config.json | 0 .../profiles/{p8 => p8_empty_config}/config.json | 0 .../profiles/{p9 => p9_empty_driver}/config.json | 0 17 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p3 => p3_empty}/config.json (87%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p4 => p4_invalid_file}/config.json (86%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p5 => p5_partial_config}/config.json (86%) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p10 => p10_invalid_file}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p11 => p11_partial_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p7 => p7_empty}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p8 => p8_empty_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p9 => p9_empty_driver}/config.json (100%) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json index efc4280179bb..b95393d6f0da 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json @@ -3,7 +3,7 @@ "Driver": { "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p11/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p11_partial_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -11,12 +11,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11_partial_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p11/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json deleted file mode 100644 index 38b7db487f51..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3/p3.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3/bzImage","initrd":"/Users/someuser/.minikube/machines/p3/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3/p3.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3/tty,log=/Users/someuser/.minikube/machines/p3/console-ring -f kexec,/Users/someuser/.minikube/machines/p3/bzImage,/Users/someuser/.minikube/machines/p3/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json similarity index 87% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json index 84e8fbfaaa4a..e387da62d9a3 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.52", - "MachineName": "p3", + "MachineName": "p3_empty", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_empty/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p3" + "Name": "p3_empty" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json new file mode 100644 index 000000000000..31f09ed93eef --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3_empty","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3_empty/bzImage","initrd":"/Users/someuser/.minikube/machines/p3_empty/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3_empty/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3_empty/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring -f kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json deleted file mode 100644 index 8489ab064669..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4/p4.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4/bzImage","initrd":"/Users/someuser/.minikube/machines/p4/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4/p4.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4/tty,log=/Users/someuser/.minikube/machines/p4/console-ring -f kexec,/Users/someuser/.minikube/machines/p4/bzImage,/Users/someuser/.minikube/machines/p4/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json similarity index 86% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json index 5eedd16a38ca..cf7f38defac8 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.53", - "MachineName": "p4", + "MachineName": "p4_invalid_file", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_invalid_file/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p4" + "Name": "p4_invalid_file" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json new file mode 100644 index 000000000000..281dcf58222c --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4_invalid_file","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4_invalid_file/bzImage","initrd":"/Users/someuser/.minikube/machines/p4_invalid_file/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring -f kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json deleted file mode 100644 index 70960a3aa5f0..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5/p5.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5/bzImage","initrd":"/Users/someuser/.minikube/machines/p5/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5/p5.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5/tty,log=/Users/someuser/.minikube/machines/p5/console-ring -f kexec,/Users/someuser/.minikube/machines/p5/bzImage,/Users/someuser/.minikube/machines/p5/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json similarity index 86% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json index 4d058d4b1f04..bf01fde29e19 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.54", - "MachineName": "p5", + "MachineName": "p5_partial_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p5/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p5_partial_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p5/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p5" + "Name": "p5_partial_config" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json new file mode 100644 index 000000000000..8ac2881b790f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json @@ -0,0 +1 @@ +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5_partial_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5_partial_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p5_partial_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json index 2b7fd6fc9442..d7b31cea7b24 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json @@ -1 +1 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8/p8.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8/bzImage","initrd":"/Users/someuser/.minikube/machines/p8/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8/p8.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8/tty,log=/Users/someuser/.minikube/machines/p8/console-ring -f kexec,/Users/someuser/.minikube/machines/p8/bzImage,/Users/someuser/.minikube/machines/p8/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8"} +{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8_empty_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8_empty_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p8_empty_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json index b6f1aa2fc4e7..1f5e9198155d 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.58", - "MachineName": "p9", + "MachineName": "p9_empty_driver", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p9/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p9_empty_driver/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9_empty_driver", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p9/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p9" + "Name": "p9_empty_driver" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10_invalid_file/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10_invalid_file/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11_partial_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11_partial_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_empty_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_empty_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json From 342584ab93b778bc41da1b328be2e47793b5a397 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 25 Jul 2019 23:31:25 +0200 Subject: [PATCH 31/55] Fixed testdata --- .../.minikube/machines/p1/hyperkit.json | 1 - .../machines/p10_invalid_file/hyperkit.json | 1 - .../machines/p11_partial_config/hyperkit.json | 1 - .../.minikube/machines/p2/config.json | 80 ------------------- .../.minikube/machines/p2/hyperkit.json | 1 - .../p2_empty_profile_config}/config.json | 12 +-- .../.minikube/machines/p3_empty/hyperkit.json | 1 - .../p3_invalid_profile_config}/config.json | 12 +-- .../machines/p4_invalid_file/hyperkit.json | 1 - .../p4_partial_profile_config}/config.json | 12 +-- .../machines/p5_partial_config/hyperkit.json | 1 - .../config.json | 0 .../.minikube/machines/p7_empty/hyperkit.json | 0 .../config.json | 0 .../machines/p8_empty_config/hyperkit.json | 1 - .../config.json | 8 +- .../machines/p9_empty_driver/config.json | 80 ------------------- .../machines/p9_empty_driver/hyperkit.json | 0 .../.minikube/profiles/p2/config.json | 49 ------------ .../p2_empty_profile_config}/config.json | 0 .../config.json | 0 .../config.json | 0 .../config.json | 0 .../config.json | 0 .../.minikube/profiles/p7_empty/config.json | 49 ------------ .../config.json | 0 .../config.json | 0 .../profiles/p9_empty_driver/config.json | 49 ------------ .../.minikube/machines/p1/hyperkit.json | 1 - .../machines/p10_invalid_file/hyperkit.json | 1 - .../machines/p11_partial_config/hyperkit.json | 1 - .../.minikube/machines/p2/config.json | 80 ------------------- .../.minikube/machines/p2/hyperkit.json | 1 - .../p2_empty_profile_config}/config.json | 12 +-- .../.minikube/machines/p3_empty/hyperkit.json | 1 - .../p3_invalid_profile_config}/config.json | 12 +-- .../machines/p4_invalid_file/hyperkit.json | 1 - .../p4_partial_profile_config}/config.json | 12 +-- .../machines/p5_partial_config/hyperkit.json | 1 - .../p6_empty_machine_config}/config.json | 0 .../.minikube/machines/p7_empty/hyperkit.json | 0 .../config.json | 0 .../machines/p8_empty_config/config.json | 0 .../machines/p8_empty_config/hyperkit.json | 1 - .../config.json | 8 +- .../machines/p9_empty_driver/config.json | 80 ------------------- .../machines/p9_empty_driver/hyperkit.json | 0 .../.minikube/profiles/p2/config.json | 49 ------------ .../p2_empty_profile_config}/config.json | 0 .../.minikube/profiles/p3_empty/config.json | 0 .../config.json | 0 .../config.json | 0 .../config.json | 0 .../config.json | 0 .../.minikube/profiles/p7_empty/config.json | 49 ------------ .../config.json | 0 .../config.json | 0 .../profiles/p9_empty_driver/config.json | 49 ------------ 58 files changed, 44 insertions(+), 674 deletions(-) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json rename pkg/minikube/config/testdata/{delete-single/.minikube/machines/p3_empty => delete-all/.minikube/machines/p2_empty_profile_config}/config.json (85%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json rename pkg/minikube/config/testdata/{delete-single/.minikube/machines/p4_invalid_file => delete-all/.minikube/machines/p3_invalid_profile_config}/config.json (84%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json rename pkg/minikube/config/testdata/{delete-single/.minikube/machines/p5_partial_config => delete-all/.minikube/machines/p4_partial_profile_config}/config.json (84%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p7_empty => p6_empty_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p10_invalid_file => p7_invalid_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json rename pkg/minikube/config/testdata/delete-all/.minikube/machines/{p11_partial_config => p8_partial_machine_config}/config.json (85%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json rename pkg/minikube/config/testdata/delete-all/.minikube/{machines/p8_empty_config => profiles/p2_empty_profile_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p4_invalid_file => p3_invalid_profile_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p5_partial_config => p4_partial_profile_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p6 => p5_missing_machine_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p8_empty_config => p6_empty_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p10_invalid_file => p7_invalid_machine_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-all/.minikube/profiles/{p11_partial_config => p8_partial_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json rename pkg/minikube/config/testdata/{delete-all/.minikube/machines/p3_empty => delete-single/.minikube/machines/p2_empty_profile_config}/config.json (85%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json rename pkg/minikube/config/testdata/{delete-all/.minikube/machines/p4_invalid_file => delete-single/.minikube/machines/p3_invalid_profile_config}/config.json (84%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json rename pkg/minikube/config/testdata/{delete-all/.minikube/machines/p5_partial_config => delete-single/.minikube/machines/p4_partial_profile_config}/config.json (84%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json rename pkg/minikube/config/testdata/{delete-all/.minikube/profiles/p3_empty => delete-single/.minikube/machines/p6_empty_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/machines/{p10_invalid_file => p7_invalid_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json rename pkg/minikube/config/testdata/delete-single/.minikube/machines/{p11_partial_config => p8_partial_machine_config}/config.json (85%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json rename pkg/minikube/config/testdata/delete-single/.minikube/{machines/p7_empty => profiles/p2_empty_profile_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p4_invalid_file => p3_invalid_profile_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p5_partial_config => p4_partial_profile_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p6 => p5_missing_machine_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p8_empty_config => p6_empty_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p10_invalid_file => p7_invalid_machine_config}/config.json (100%) rename pkg/minikube/config/testdata/delete-single/.minikube/profiles/{p11_partial_config => p8_partial_machine_config}/config.json (100%) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json deleted file mode 100644 index df350fb656fe..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p1/bzImage","initrd":"/Users/someuser/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring -f kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json deleted file mode 100644 index 581f9e648f6b..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json deleted file mode 100644 index a924f25ad0de..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p11/bzImage","initrd":"/Users/someuser/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring -f kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json deleted file mode 100644 index d6acef4d4f27..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.51", - "MachineName": "p2", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p2/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p2" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json deleted file mode 100644 index 4520dd1642e7..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p2/bzImage","initrd":"/Users/someuser/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring -f kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json similarity index 85% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json index e387da62d9a3..a9e6592c7afd 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.52", - "MachineName": "p3_empty", + "MachineName": "p2_empty_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_empty/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p3_empty" + "Name": "p2_empty_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json deleted file mode 100644 index 31f09ed93eef..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3_empty","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3_empty/bzImage","initrd":"/Users/someuser/.minikube/machines/p3_empty/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3_empty/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3_empty/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring -f kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json similarity index 84% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json index cf7f38defac8..8d23c98dc6b9 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.53", - "MachineName": "p4_invalid_file", + "MachineName": "p3_invalid_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_invalid_file/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p4_invalid_file" + "Name": "p3_invalid_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json deleted file mode 100644 index 281dcf58222c..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4_invalid_file","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4_invalid_file/bzImage","initrd":"/Users/someuser/.minikube/machines/p4_invalid_file/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring -f kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json similarity index 84% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json index bf01fde29e19..14b416d3c2cf 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.54", - "MachineName": "p5_partial_config", + "MachineName": "p4_partial_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p5_partial_config/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p5_partial_config" + "Name": "p4_partial_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json deleted file mode 100644 index 8ac2881b790f..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5_partial_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5_partial_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p5_partial_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_empty/hyperkit.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p10_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json deleted file mode 100644 index d7b31cea7b24..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8_empty_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8_empty_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p8_empty_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json similarity index 85% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json index b95393d6f0da..d4525a7861ff 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p11_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json @@ -3,7 +3,7 @@ "Driver": { "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p11_partial_config/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -11,12 +11,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11_partial_config", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json deleted file mode 100644 index 1f5e9198155d..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.58", - "MachineName": "p9_empty_driver", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p9_empty_driver/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9_empty_driver", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p9_empty_driver" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p9_empty_driver/hyperkit.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json deleted file mode 100644 index 77529a124fea..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.51", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_empty_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_empty_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json deleted file mode 100644 index 5891cb15bf20..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_empty/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.56", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p10_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p11_partial_config/config.json rename to pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json deleted file mode 100644 index 9a55310acceb..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p9_empty_driver/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.58", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json deleted file mode 100644 index df350fb656fe..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p1","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p1/p1.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p1/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p1/bzImage","initrd":"/Users/someuser/.minikube/machines/p1/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13262,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p1/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","5e6787b6-aecb-11e9-81cf-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p1/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 5e6787b6-aecb-11e9-81cf-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p1/p1.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p1/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p1/tty,log=/Users/someuser/.minikube/machines/p1/console-ring -f kexec,/Users/someuser/.minikube/machines/p1/bzImage,/Users/someuser/.minikube/machines/p1/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json deleted file mode 100644 index 581f9e648f6b..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json deleted file mode 100644 index a924f25ad0de..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p11","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"4f16872c-aee8-11e9-8815-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p11/p11.rawdisk"}], "vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p11/bzImage","initrd":"/Users/someuser/.minikube/machines/p11/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14335,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p11/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","4f16872c-aee8-11e9-8815-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p11/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 4f16872c-aee8-11e9-8815-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p11/p11.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p11/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p11/tty,log=/Users/someuser/.minikube/machines/p11/console-ring -f kexec,/Users/someuser/.minikube/machines/p11/bzImage,/Users/someuser/.minikube/machines/p11/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json deleted file mode 100644 index d6acef4d4f27..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.51", - "MachineName": "p2", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p2/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "a83fbd30-aecc-11e9-a55f-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p2" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json deleted file mode 100644 index 4520dd1642e7..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p2","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p2/p2.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p2/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p2/bzImage","initrd":"/Users/someuser/.minikube/machines/p2/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13454,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p2/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","a83fbd30-aecc-11e9-a55f-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p2/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U a83fbd30-aecc-11e9-a55f-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p2/p2.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p2/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p2/tty,log=/Users/someuser/.minikube/machines/p2/console-ring -f kexec,/Users/someuser/.minikube/machines/p2/bzImage,/Users/someuser/.minikube/machines/p2/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json similarity index 85% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json index e387da62d9a3..a9e6592c7afd 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_empty/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.52", - "MachineName": "p3_empty", + "MachineName": "p2_empty_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_empty/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3_empty/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p3_empty" + "Name": "p2_empty_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json deleted file mode 100644 index 31f09ed93eef..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_empty/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p3_empty","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p3_empty/bzImage","initrd":"/Users/someuser/.minikube/machines/p3_empty/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13669,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p3_empty/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p3_empty/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p3_empty/p3_empty.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p3_empty/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p3_empty/tty,log=/Users/someuser/.minikube/machines/p3_empty/console-ring -f kexec,/Users/someuser/.minikube/machines/p3_empty/bzImage,/Users/someuser/.minikube/machines/p3_empty/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_empty"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json similarity index 84% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json index cf7f38defac8..8d23c98dc6b9 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_invalid_file/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.53", - "MachineName": "p4_invalid_file", + "MachineName": "p3_invalid_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_invalid_file/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4_invalid_file/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p4_invalid_file" + "Name": "p3_invalid_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json deleted file mode 100644 index 281dcf58222c..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_invalid_file/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p4_invalid_file","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"759044c8-aee4-11e9-bd0a-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p4_invalid_file/bzImage","initrd":"/Users/someuser/.minikube/machines/p4_invalid_file/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13752,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","759044c8-aee4-11e9-bd0a-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p4_invalid_file/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 759044c8-aee4-11e9-bd0a-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p4_invalid_file/p4_invalid_file.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p4_invalid_file/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p4_invalid_file/tty,log=/Users/someuser/.minikube/machines/p4_invalid_file/console-ring -f kexec,/Users/someuser/.minikube/machines/p4_invalid_file/bzImage,/Users/someuser/.minikube/machines/p4_invalid_file/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_invalid_file"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json similarity index 84% rename from pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json index bf01fde29e19..14b416d3c2cf 100644 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p5_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json @@ -2,10 +2,10 @@ "ConfigVersion": 3, "Driver": { "IPAddress": "192.168.64.54", - "MachineName": "p5_partial_config", + "MachineName": "p4_partial_profile_config", "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p5_partial_config/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -14,12 +14,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, @@ -76,5 +76,5 @@ "StorePath": "/Users/someuser/.minikube" } }, - "Name": "p5_partial_config" + "Name": "p4_partial_profile_config" } diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json deleted file mode 100644 index 8ac2881b790f..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p5_partial_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p5_partial_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"faf8face-aee4-11e9-9ba1-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p5_partial_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p5_partial_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":13829,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","faf8face-aee4-11e9-9ba1-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p5_partial_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U faf8face-aee4-11e9-9ba1-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p5_partial_config/p5_partial_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p5_partial_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p5_partial_config/tty,log=/Users/someuser/.minikube/machines/p5_partial_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p5_partial_config/bzImage,/Users/someuser/.minikube/machines/p5_partial_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config"} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_empty/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/hyperkit.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p10_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json deleted file mode 100644 index d7b31cea7b24..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_empty_config/hyperkit.json +++ /dev/null @@ -1 +0,0 @@ -{"hyperkit":"/usr/local/bin/hyperkit","argv0":"","state_dir":"/Users/someuser/.minikube/machines/p8_empty_config","vpnkit_sock":"","vpnkit_uuid":"","vpnkit_preferred_ipv4":"","uuid":"7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","disks":[{"path":"/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","size":20000,"format":"","driver":"virtio-blk"}],"iso":["/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso"],"vsock":false,"vsock_ports":null,"vsock_guest_cid":3,"vmnet":true,"9p_sockets":null,"kernel":"/Users/someuser/.minikube/machines/p8_empty_config/bzImage","initrd":"/Users/someuser/.minikube/machines/p8_empty_config/initrd","bootrom":"","cpus":2,"memory":2000,"console":1,"extra_files":null,"pid":14123,"arguments":["-A","-u","-F","/Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid","-c","2","-m","2000M","-s","0:0,hostbridge","-s","31,lpc","-s","1:0,virtio-net","-U","7f30e71e-aee7-11e9-96c9-8c8590c3b8b4","-s","2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk","-s","3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso","-s","4,virtio-rnd","-l","com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring","-f","kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"],"cmdline":"/usr/local/bin/hyperkit -A -u -F /Users/someuser/.minikube/machines/p8_empty_config/hyperkit.pid -c 2 -m 2000M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U 7f30e71e-aee7-11e9-96c9-8c8590c3b8b4 -s 2:0,virtio-blk,/Users/someuser/.minikube/machines/p8_empty_config/p8_empty_config.rawdisk -s 3,ahci-cd,/Users/someuser/.minikube/machines/p8_empty_config/boot2docker.iso -s 4,virtio-rnd -l com1,autopty=/Users/someuser/.minikube/machines/p8_empty_config/tty,log=/Users/someuser/.minikube/machines/p8_empty_config/console-ring -f kexec,/Users/someuser/.minikube/machines/p8_empty_config/bzImage,/Users/someuser/.minikube/machines/p8_empty_config/initrd,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_empty_config"} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json similarity index 85% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json index b95393d6f0da..d4525a7861ff 100644 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p11_partial_config/config.json +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json @@ -3,7 +3,7 @@ "Driver": { "SSHUser": "docker", "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p11_partial_config/id_rsa", + "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", "StorePath": "/Users/someuser/.minikube", "SwarmMaster": false, "SwarmHost": "", @@ -11,12 +11,12 @@ "DiskSize": 20000, "CPU": 2, "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p11_partial_config", + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", "NFSShares": [], "NFSSharesRoot": "/nfsshares", "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p11_partial_config/b2d-image/boot/initrd", + "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", "Initrd": "initrd", "Vmlinuz": "bzImage" }, diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json deleted file mode 100644 index 1f5e9198155d..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.58", - "MachineName": "p9_empty_driver", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p9_empty_driver/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p9_empty_driver", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "bc3426d0-aee7-11e9-b24a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p9_empty_driver/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p9_empty_driver" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p9_empty_driver/hyperkit.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json deleted file mode 100644 index 77529a124fea..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.51", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_empty/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_empty/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_partial_config/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_empty_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_empty_config/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json deleted file mode 100644 index 5891cb15bf20..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_empty/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.56", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10_invalid_file/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p10_invalid_file/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11_partial_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/delete-single/.minikube/profiles/p11_partial_config/config.json rename to pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json deleted file mode 100644 index 9a55310acceb..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p9_empty_driver/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.58", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} From a1d73a7a34788ed80943943d105cb67dddbf7305 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Mon, 29 Jul 2019 23:19:13 +0200 Subject: [PATCH 32/55] Added method to delete invalid profiles Added unit tests for DeleteProfiles deleteProfile for not part of api anymore Added more validation for profiles --- cmd/minikube/cmd/delete.go | 44 ++- cmd/minikube/cmd/delete_test.go | 412 ++++++++++++++++++++++++++++ pkg/minikube/config/profile.go | 10 +- pkg/minikube/constants/constants.go | 9 + 4 files changed, 465 insertions(+), 10 deletions(-) create mode 100644 cmd/minikube/cmd/delete_test.go diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index cc50c74ca742..f58d12bf615a 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -84,7 +84,7 @@ func runDelete(cmd *cobra.Command, args []string) { exit.WithError("Error getting profiles to delete", err) } - errs := DeleteAllProfiles(profilesToDelete) + errs := DeleteProfiles(profilesToDelete) if len(errs) > 0 { HandleDeletionErrors(errs) } @@ -99,25 +99,33 @@ func runDelete(cmd *cobra.Command, args []string) { out.ErrT(out.Meh, `"{{.name}}" profile does not exist`, out.V{"name": profileName}) } - err = DeleteProfile(profile) + errs := DeleteProfiles([]*pkg_config.Profile{profile}) if err != nil { - HandleDeletionErrors([]error{err}) + HandleDeletionErrors(errs) } } } -func DeleteAllProfiles(profiles []*pkg_config.Profile) []error { +func DeleteProfiles(profiles []*pkg_config.Profile) []error { var errs []error for _, profile := range profiles { - err := DeleteProfile(profile) - if err != nil { + err := deleteProfile(profile) + + _, errStat := os.Stat(constants.GetMachinePath(profile.Name, constants.GetMinipath())) + // TODO: if (err != nil && !profile.IsValid()) || (err != nil && !machineConfig.IsValid()) { + if (err != nil && !profile.IsValid()) || (err != nil && os.IsNotExist(errStat)) { + invalidProfileDeletionErrs := DeleteInvalidProfile(profile) + if len(invalidProfileDeletionErrs) > 0 { + errs = append(errs, invalidProfileDeletionErrs...) + } + } else if err != nil { errs = append(errs, err) } } return errs } -func DeleteProfile(profile *pkg_config.Profile) error { +func deleteProfile(profile *pkg_config.Profile) error { viper.Set(pkg_config.MachineProfile, profile.Name) api, err := machine.NewAPIClient() @@ -180,6 +188,28 @@ func DeleteProfile(profile *pkg_config.Profile) error { return nil } +func DeleteInvalidProfile(profile *pkg_config.Profile) []error { + out.T(out.DeletingHost, "Trying to delete invalid profile {{.profile}}", out.V{"profile": profile.Name}) + + var errs []error + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + err := os.RemoveAll(pathToProfile) + if err != nil { + errs = append(errs, DeletionError{err, Fatal}) + } + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + err := os.RemoveAll(pathToMachine) + if err != nil { + errs = append(errs, DeletionError{err, Fatal}) + } + } + return errs +} + func profileDeletionErr(profileName string, additionalInfo string) error { return fmt.Errorf("error deleting profile \"%s\": %s", profileName, additionalInfo) } diff --git a/cmd/minikube/cmd/delete_test.go b/cmd/minikube/cmd/delete_test.go new file mode 100644 index 000000000000..1e2c03e25ce5 --- /dev/null +++ b/cmd/minikube/cmd/delete_test.go @@ -0,0 +1,412 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "fmt" + "io/ioutil" + "os" + "path/filepath" + "testing" + + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/constants" +) + +func TestDeleteProfileWithValidConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p1" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p2_empty_profile_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p3_invalid_profile_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p4_partial_profile_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p5_missing_machine_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != numberOfMachineDirs { + t.Fatal("Deleted a machine config when it should not") + } +} + +func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p6_empty_machine_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p7_invalid_machine_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} + +func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-single/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + profileToDelete := "p8_partial_machine_config" + profile, _ := config.LoadProfile(profileToDelete) + + errs := DeleteProfiles([]*config.Profile{profile}) + + if len(errs) > 0 { + HandleDeletionErrors(errs) + t.Fatal("Errors while deleting profiles") + } + + pathToProfile := constants.GetProfilePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { + t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } + + if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + t.Fatal("Did not delete exactly one profile") + } +} diff --git a/pkg/minikube/config/profile.go b/pkg/minikube/config/profile.go index f95990b463d2..9d454964dc80 100644 --- a/pkg/minikube/config/profile.go +++ b/pkg/minikube/config/profile.go @@ -23,8 +23,12 @@ import ( "k8s.io/minikube/pkg/minikube/constants" ) -// isValid checks if the profile has the essential info needed for a profile -func (p *Profile) isValid() bool { +// IsValid checks if the profile has the essential info needed for a profile +func (p *Profile) IsValid() bool { + if p.Config == nil { + return false + } + if p.Config.MachineConfig.VMDriver == "" { return false } @@ -48,7 +52,7 @@ func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile, inValidPs = append(inValidPs, p) continue } - if !p.isValid() { + if !p.IsValid() { inValidPs = append(inValidPs, p) continue } diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 2929079a889c..a03582eb375c 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -208,6 +208,15 @@ func GetProfilePath(profile string, miniHome ...string) string { return filepath.Join(miniPath, "profiles", profile) } +// GetMachinePath returns the Minikube machine path of a machine +func GetMachinePath(machine string, miniHome ...string) string { + miniPath := GetMinipath() + if len(miniHome) > 0 { + miniPath = miniHome[0] + } + return filepath.Join(miniPath, "machines", machine) +} + // AddonsPath is the default path of the addons configuration const AddonsPath = "/etc/kubernetes/addons" From 50329ed870a4da50d5954eeebcf10cc7ba0a99f1 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Wed, 7 Aug 2019 21:48:46 +0200 Subject: [PATCH 33/55] Added machine.go to Load and Validate machines Added empty machine_test.go Added testdata for machine.go --- cmd/minikube/cmd/delete.go | 11 +- pkg/minikube/config/machine.go | 115 ++++++++++++++++++ pkg/minikube/config/machine_test.go | 17 +++ .../machine/.minikube/machines/p1/config.json | 80 ++++++++++++ .../machine/.minikube/machines/p2/config.json | 80 ++++++++++++ .../machines/p3_empty_config/config.json | 0 .../p4_invalid_machine_config/config.json | 1 + .../machines/p5_partial_config/config.json | 72 +++++++++++ 8 files changed, 373 insertions(+), 3 deletions(-) create mode 100644 pkg/minikube/config/machine.go create mode 100644 pkg/minikube/config/machine_test.go create mode 100644 pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json create mode 100644 pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json create mode 100644 pkg/minikube/config/testdata/machine/.minikube/machines/p3_empty_config/config.json create mode 100644 pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index f58d12bf615a..fcca91bf1127 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -111,9 +111,14 @@ func DeleteProfiles(profiles []*pkg_config.Profile) []error { for _, profile := range profiles { err := deleteProfile(profile) - _, errStat := os.Stat(constants.GetMachinePath(profile.Name, constants.GetMinipath())) - // TODO: if (err != nil && !profile.IsValid()) || (err != nil && !machineConfig.IsValid()) { - if (err != nil && !profile.IsValid()) || (err != nil && os.IsNotExist(errStat)) { + var mm *pkg_config.Machine + var loadErr error + + if err != nil { + mm, loadErr = pkg_config.LoadMachine(profile.Name) + } + + if (err != nil && !profile.IsValid()) || (loadErr != nil || !mm.IsValid()) { invalidProfileDeletionErrs := DeleteInvalidProfile(profile) if len(invalidProfileDeletionErrs) > 0 { errs = append(errs, invalidProfileDeletionErrs...) diff --git a/pkg/minikube/config/machine.go b/pkg/minikube/config/machine.go new file mode 100644 index 000000000000..ecbc1933610c --- /dev/null +++ b/pkg/minikube/config/machine.go @@ -0,0 +1,115 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +//TODO: Resolve import cycle +import ( + "github.com/docker/machine/libmachine/host" + "github.com/pkg/errors" + "io/ioutil" + "k8s.io/minikube/pkg/minikube/cluster" + "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/machine" + "path/filepath" +) + +type Machine struct { + *host.Host +} + +func (h *Machine) IsValid() bool { + if h == nil { + return false + } + + if h.Host == nil { + return false + } + + if h.Host.Name == "" { + return false + } + + if h.Host.Driver == nil { + return false + } + + if h.Host.HostOptions == nil { + return false + } + + if h.Host.RawDriver == nil { + return false + } + return true +} + +func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines []*Machine, err error) { + pDirs, err := machineDirs(miniHome...) + if err != nil { + return nil, nil, err + } + for _, n := range pDirs { + p, err := LoadMachine(n) + if err != nil { + inValidMachines = append(inValidMachines, p) + continue + } + if !p.IsValid() { + inValidMachines = append(inValidMachines, p) + continue + } + validMachines = append(validMachines, p) + } + return validMachines, inValidMachines, nil +} + +func LoadMachine(name string) (*Machine, error) { + api, err := machine.NewAPIClient() + if err != nil { + return nil, err + } + + h, err := cluster.CheckIfHostExistsAndLoad(api, name) + if err != nil { + return nil, err + } + + var mm Machine + if h != nil { + mm.Host = h + } else { + return nil, errors.New("host is nil") + } + + return &mm, nil +} + +func machineDirs(miniHome ...string) (dirs []string, err error) { + miniPath := constants.GetMinipath() + if len(miniHome) > 0 { + miniPath = miniHome[0] + } + mRootDir := filepath.Join(miniPath, "machines") + items, err := ioutil.ReadDir(mRootDir) + for _, f := range items { + if f.IsDir() { + dirs = append(dirs, f.Name()) + } + } + return dirs, err +} diff --git a/pkg/minikube/config/machine_test.go b/pkg/minikube/config/machine_test.go new file mode 100644 index 000000000000..435edadbafef --- /dev/null +++ b/pkg/minikube/config/machine_test.go @@ -0,0 +1,17 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json new file mode 100644 index 000000000000..90a026a01c51 --- /dev/null +++ b/pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p1", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p1" +} diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json b/pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json new file mode 100644 index 000000000000..3a9813e57d31 --- /dev/null +++ b/pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p2", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p2" +} diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p3_empty_config/config.json b/pkg/minikube/config/testdata/machine/.minikube/machines/p3_empty_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json b/pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json b/pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json new file mode 100644 index 000000000000..d7b7092761f3 --- /dev/null +++ b/pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json @@ -0,0 +1,72 @@ +{ + "ConfigVersion": 3, + "Driver": { + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p5_partial_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p5_partial_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p5_partial_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, +} From 6ed4262849278b7f76c8601b5d832d23cae74de5 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 8 Aug 2019 21:41:58 +0200 Subject: [PATCH 34/55] Resolved import cycle Added unit test for machine.go --- cmd/minikube/cmd/delete.go | 4 +- pkg/minikube/{config => cluster}/machine.go | 6 +- pkg/minikube/cluster/machine_test.go | 70 +++++++++++++++++++ .../machine/.minikube/machines/p1/config.json | 0 .../machine/.minikube/machines/p2/config.json | 0 .../machines/p3_empty_config/config.json | 0 .../p4_invalid_machine_config/config.json | 0 .../machines/p5_partial_config/config.json | 0 pkg/minikube/config/machine_test.go | 17 ----- 9 files changed, 74 insertions(+), 23 deletions(-) rename pkg/minikube/{config => cluster}/machine.go (94%) create mode 100644 pkg/minikube/cluster/machine_test.go rename pkg/minikube/{config => cluster}/testdata/machine/.minikube/machines/p1/config.json (100%) rename pkg/minikube/{config => cluster}/testdata/machine/.minikube/machines/p2/config.json (100%) rename pkg/minikube/{config => cluster}/testdata/machine/.minikube/machines/p3_empty_config/config.json (100%) rename pkg/minikube/{config => cluster}/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json (100%) rename pkg/minikube/{config => cluster}/testdata/machine/.minikube/machines/p5_partial_config/config.json (100%) delete mode 100644 pkg/minikube/config/machine_test.go diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index fcca91bf1127..d7d77e488bc3 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -111,11 +111,11 @@ func DeleteProfiles(profiles []*pkg_config.Profile) []error { for _, profile := range profiles { err := deleteProfile(profile) - var mm *pkg_config.Machine + var mm *cluster.Machine var loadErr error if err != nil { - mm, loadErr = pkg_config.LoadMachine(profile.Name) + mm, loadErr = cluster.LoadMachine(profile.Name) } if (err != nil && !profile.IsValid()) || (loadErr != nil || !mm.IsValid()) { diff --git a/pkg/minikube/config/machine.go b/pkg/minikube/cluster/machine.go similarity index 94% rename from pkg/minikube/config/machine.go rename to pkg/minikube/cluster/machine.go index ecbc1933610c..4c60aa96554f 100644 --- a/pkg/minikube/config/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -14,14 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package config +package cluster -//TODO: Resolve import cycle import ( "github.com/docker/machine/libmachine/host" "github.com/pkg/errors" "io/ioutil" - "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/machine" "path/filepath" @@ -84,7 +82,7 @@ func LoadMachine(name string) (*Machine, error) { return nil, err } - h, err := cluster.CheckIfHostExistsAndLoad(api, name) + h, err := CheckIfHostExistsAndLoad(api, name) if err != nil { return nil, err } diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go new file mode 100644 index 000000000000..0b7b11136403 --- /dev/null +++ b/pkg/minikube/cluster/machine_test.go @@ -0,0 +1,70 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cluster + +import ( + "io/ioutil" + "k8s.io/minikube/pkg/minikube/constants" + "os" + "path/filepath" + "testing" +) + +func TestListMachines(t *testing.T) { + const ( + numberOfValidMachines = 2 + numberOfInValidMachines = 3 + totalNumberOfMachines = numberOfValidMachines + numberOfInValidMachines + ) + + testMinikubeDir := "./testdata/machine" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + validMachines, inValidMachines, err := ListMachines() + + if err != nil { + t.Error(err) + } + + if numberOfValidMachines != len(validMachines) { + t.Errorf("expected %d valid machines, got %d", numberOfValidMachines, len(validMachines)) + } + + if numberOfInValidMachines != len(inValidMachines) { + t.Errorf("expected %d invalid machines, got %d", numberOfInValidMachines, len(inValidMachines)) + } + + if totalNumberOfMachines != len(validMachines)+len(inValidMachines) { + t.Errorf("expected %d total machines, got %d", totalNumberOfMachines, len(validMachines)+len(inValidMachines)) + } + + if numberOfMachineDirs != len(validMachines)+len(inValidMachines) { + t.Error("expected number of machine directories to be equal to the number of total machines") + } +} diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json similarity index 100% rename from pkg/minikube/config/testdata/machine/.minikube/machines/p1/config.json rename to pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json similarity index 100% rename from pkg/minikube/config/testdata/machine/.minikube/machines/p2/config.json rename to pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p3_empty_config/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p3_empty_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/machine/.minikube/machines/p3_empty_config/config.json rename to pkg/minikube/cluster/testdata/machine/.minikube/machines/p3_empty_config/config.json diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json rename to pkg/minikube/cluster/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json diff --git a/pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p5_partial_config/config.json similarity index 100% rename from pkg/minikube/config/testdata/machine/.minikube/machines/p5_partial_config/config.json rename to pkg/minikube/cluster/testdata/machine/.minikube/machines/p5_partial_config/config.json diff --git a/pkg/minikube/config/machine_test.go b/pkg/minikube/config/machine_test.go deleted file mode 100644 index 435edadbafef..000000000000 --- a/pkg/minikube/config/machine_test.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config From f0dd5a7e35b357baa699bb72991b346d0da8c62b Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 8 Aug 2019 23:16:46 +0200 Subject: [PATCH 35/55] Added unit test for deletion of all profiles Improved logging --- cmd/minikube/cmd/delete.go | 10 +++-- cmd/minikube/cmd/delete_test.go | 79 +++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 12 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index d7d77e488bc3..692560e967af 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -87,6 +87,8 @@ func runDelete(cmd *cobra.Command, args []string) { errs := DeleteProfiles(profilesToDelete) if len(errs) > 0 { HandleDeletionErrors(errs) + } else { + out.T(out.DeletingHost, "Successfully deleted all profiles") } } else { if len(args) > 0 { @@ -100,8 +102,10 @@ func runDelete(cmd *cobra.Command, args []string) { } errs := DeleteProfiles([]*pkg_config.Profile{profile}) - if err != nil { + if len(errs) > 0 { HandleDeletionErrors(errs) + } else { + out.T(out.DeletingHost, "Successfully deleted profile \"{{.name}}\"", out.V{"name": profileName}) } } } @@ -119,7 +123,7 @@ func DeleteProfiles(profiles []*pkg_config.Profile) []error { } if (err != nil && !profile.IsValid()) || (loadErr != nil || !mm.IsValid()) { - invalidProfileDeletionErrs := DeleteInvalidProfile(profile) + invalidProfileDeletionErrs := deleteInvalidProfile(profile) if len(invalidProfileDeletionErrs) > 0 { errs = append(errs, invalidProfileDeletionErrs...) } @@ -193,7 +197,7 @@ func deleteProfile(profile *pkg_config.Profile) error { return nil } -func DeleteInvalidProfile(profile *pkg_config.Profile) []error { +func deleteInvalidProfile(profile *pkg_config.Profile) []error { out.T(out.DeletingHost, "Trying to delete invalid profile {{.profile}}", out.V{"profile": profile.Name}) var errs []error diff --git a/cmd/minikube/cmd/delete_test.go b/cmd/minikube/cmd/delete_test.go index 1e2c03e25ce5..a377c3135ebc 100644 --- a/cmd/minikube/cmd/delete_test.go +++ b/cmd/minikube/cmd/delete_test.go @@ -17,7 +17,6 @@ limitations under the License. package cmd import ( - "fmt" "io/ioutil" "os" "path/filepath" @@ -37,7 +36,7 @@ func TestDeleteProfileWithValidConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -85,7 +84,7 @@ func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -133,7 +132,7 @@ func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -181,7 +180,7 @@ func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -229,7 +228,7 @@ func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -277,7 +276,7 @@ func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -325,7 +324,7 @@ func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -373,7 +372,7 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { err = os.Setenv(constants.MinikubeHome, miniDir) if err != nil { - fmt.Printf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) } files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) @@ -410,3 +409,65 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { t.Fatal("Did not delete exactly one profile") } } + +func TestDeleteAllProfiles(t *testing.T) { + const numberOfTotalProfileDirs = 8 + const numberOfTotalMachineDirs = 7 + + testMinikubeDir := "../../../pkg/minikube/config/testdata/delete-all/.minikube" + miniDir, err := filepath.Abs(testMinikubeDir) + + if err != nil { + t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) + } + + err = os.Setenv(constants.MinikubeHome, miniDir) + if err != nil { + t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + } + + files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs := len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs := len(files) + + if numberOfTotalProfileDirs != numberOfProfileDirs { + t.Error("invalid testdata") + } + + if numberOfTotalMachineDirs != numberOfMachineDirs { + t.Error("invalid testdata") + } + + validProfiles, inValidProfiles, err := config.ListProfiles() + + if err != nil { + t.Error(err) + } + + if numberOfTotalProfileDirs != len(validProfiles)+len(inValidProfiles) { + t.Error("invalid testdata") + } + + profiles := append(validProfiles, inValidProfiles...) + errs := DeleteProfiles(profiles) + + if errs != nil { + t.Errorf("errors while deleting all profiles: %v", errs) + } + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + numberOfProfileDirs = len(files) + + files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + numberOfMachineDirs = len(files) + + if numberOfProfileDirs != 0 { + t.Errorf("Did not delete all profiles: still %d profiles left", numberOfProfileDirs) + } + + if numberOfMachineDirs != 0 { + t.Errorf("Did not delete all profiles: still %d machines left", numberOfMachineDirs) + } +} From 229c9b7ee9c54668c89ca12e2c286cd5570548e2 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 8 Aug 2019 23:21:05 +0200 Subject: [PATCH 36/55] Fixed lint errors --- pkg/minikube/cluster/machine.go | 5 +++-- pkg/minikube/cluster/machine_test.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/cluster/machine.go b/pkg/minikube/cluster/machine.go index 4c60aa96554f..cd28295ee25d 100644 --- a/pkg/minikube/cluster/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -17,12 +17,13 @@ limitations under the License. package cluster import ( + "io/ioutil" + "path/filepath" + "github.com/docker/machine/libmachine/host" "github.com/pkg/errors" - "io/ioutil" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/machine" - "path/filepath" ) type Machine struct { diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index 0b7b11136403..5a9e2c7107d8 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -18,10 +18,11 @@ package cluster import ( "io/ioutil" - "k8s.io/minikube/pkg/minikube/constants" "os" "path/filepath" "testing" + + "k8s.io/minikube/pkg/minikube/constants" ) func TestListMachines(t *testing.T) { From 4835945839823e8828698c7d2e93427022d42558 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sun, 18 Aug 2019 19:44:09 +0200 Subject: [PATCH 37/55] Bugfix Refactor --- cmd/minikube/cmd/delete.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 692560e967af..60729515a1a3 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -115,20 +115,17 @@ func DeleteProfiles(profiles []*pkg_config.Profile) []error { for _, profile := range profiles { err := deleteProfile(profile) - var mm *cluster.Machine - var loadErr error - if err != nil { - mm, loadErr = cluster.LoadMachine(profile.Name) - } - - if (err != nil && !profile.IsValid()) || (loadErr != nil || !mm.IsValid()) { - invalidProfileDeletionErrs := deleteInvalidProfile(profile) - if len(invalidProfileDeletionErrs) > 0 { - errs = append(errs, invalidProfileDeletionErrs...) + mm, loadErr := cluster.LoadMachine(profile.Name) + + if !profile.IsValid() || (loadErr != nil || !mm.IsValid()) { + invalidProfileDeletionErrs := deleteInvalidProfile(profile) + if len(invalidProfileDeletionErrs) > 0 { + errs = append(errs, invalidProfileDeletionErrs...) + } + } else { + errs = append(errs, err) } - } else if err != nil { - errs = append(errs, err) } } return errs From d5bfa87edf127d65f04677ea2d092aa41a1c15bf Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sun, 18 Aug 2019 22:12:43 +0200 Subject: [PATCH 38/55] Added delete --all to proxy_test --- test/integration/proxy_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/integration/proxy_test.go b/test/integration/proxy_test.go index 3241d80b562a..de4ee46622df 100644 --- a/test/integration/proxy_test.go +++ b/test/integration/proxy_test.go @@ -96,9 +96,16 @@ func TestProxy(t *testing.T) { t.Errorf("Error shutting down the http proxy") } - _, _, err = r.RunWithContext(ctx, "delete") + _, _, err = r.RunWithContext(ctx, "delete --all") if err != nil { - t.Logf("Error deleting minikube when cleaning up proxy setup: %s", err) + t.Errorf("Error deleting minikube when cleaning up proxy setup: %s", err) + } + + stdOut, stdErr, _ := r.RunWithContext(ctx, "profile list") + + msg := "No minikube profile was found" + if stdOut != "" || !strings.Contains(stdErr, msg) { + t.Errorf("minikube delete --all did not delete all profiles") } }(t) From da1f935da847fb32149c16e2d277c13d6b6f3d60 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Mon, 19 Aug 2019 21:40:23 +0200 Subject: [PATCH 39/55] Readded Shutdown and Teardown --- test/integration/z_proxy_test.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/integration/z_proxy_test.go b/test/integration/z_proxy_test.go index e26099cfb9a4..43fc879e3189 100644 --- a/test/integration/z_proxy_test.go +++ b/test/integration/z_proxy_test.go @@ -22,7 +22,6 @@ limitations under the License. package integration import ( - "context" "fmt" "io/ioutil" "os" @@ -34,7 +33,7 @@ import ( "net/url" "github.com/elazarl/goproxy" - retryablehttp "github.com/hashicorp/go-retryablehttp" + "github.com/hashicorp/go-retryablehttp" "github.com/phayes/freeport" "github.com/pkg/errors" "k8s.io/minikube/test/integration/util" @@ -94,11 +93,6 @@ func TestProxy(t *testing.T) { t.Errorf("Error reverting the NO_PROXY env") } - err := srv.Shutdown(context.TODO()) // shutting down the http proxy after tests - if err != nil { - t.Errorf("Error shutting down the http proxy") - } - _, _, err = r.RunWithContext(ctx, "delete --all") if err != nil { t.Errorf("Error deleting minikube when cleaning up proxy setup: %s", err) @@ -110,6 +104,15 @@ func TestProxy(t *testing.T) { if stdOut != "" || !strings.Contains(stdErr, msg) { t.Errorf("minikube delete --all did not delete all profiles") } + + err := srv.Shutdown(context.TODO()) // shutting down the http proxy after tests + if err != nil { + t.Errorf("Error shutting down the http proxy") + } + if !isTestNoneDriver(t) { + mk.TearDown(t) + } + }(t) t.Run("ProxyConsoleWarnning", testProxyWarning) t.Run("ProxyDashboard", testProxyDashboard) From 5289e1f465632b93263fbd90c239a0ddac6ae00f Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Mon, 19 Aug 2019 21:59:10 +0200 Subject: [PATCH 40/55] Fixed lint errors --- test/integration/z_proxy_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/integration/z_proxy_test.go b/test/integration/z_proxy_test.go index 43fc879e3189..6d7666dab243 100644 --- a/test/integration/z_proxy_test.go +++ b/test/integration/z_proxy_test.go @@ -22,6 +22,7 @@ limitations under the License. package integration import ( + "context" "fmt" "io/ioutil" "os" @@ -33,7 +34,7 @@ import ( "net/url" "github.com/elazarl/goproxy" - "github.com/hashicorp/go-retryablehttp" + retryablehttp "github.com/hashicorp/go-retryablehttp" "github.com/phayes/freeport" "github.com/pkg/errors" "k8s.io/minikube/test/integration/util" @@ -93,12 +94,12 @@ func TestProxy(t *testing.T) { t.Errorf("Error reverting the NO_PROXY env") } - _, _, err = r.RunWithContext(ctx, "delete --all") - if err != nil { + _, stdErr := mk.RunCommand("delete --all", false) + if stdErr != "" { t.Errorf("Error deleting minikube when cleaning up proxy setup: %s", err) } - stdOut, stdErr, _ := r.RunWithContext(ctx, "profile list") + stdOut, stdErr := mk.RunCommand("profile list", false) msg := "No minikube profile was found" if stdOut != "" || !strings.Contains(stdErr, msg) { From b3741bd9523b4009a74cde88a497449a2933da85 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Tue, 20 Aug 2019 21:10:29 +0200 Subject: [PATCH 41/55] Readded init --- cmd/minikube/cmd/delete.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index da6fb503e7c5..3bef814c429a 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -336,3 +336,8 @@ func killMountProcess() error { } return nil } + +func init() { + deleteCmd.Flags().BoolVar(&deleteAll, "all", false, "Set flag to delete all profiles") + RootCmd.AddCommand(deleteCmd) +} From 808477ae1ea6ca715a2328471f3d0e165396f8dd Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Fri, 23 Aug 2019 19:47:41 +0200 Subject: [PATCH 42/55] Moved GetMachinePath to machine.go and renamed it to MachinePath Added comments to public functions --- cmd/minikube/cmd/delete.go | 4 +++- cmd/minikube/cmd/delete_test.go | 17 +++++++++-------- pkg/minikube/cluster/machine.go | 13 +++++++++++++ pkg/minikube/constants/constants.go | 9 --------- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 3bef814c429a..3e388b2c4350 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -113,6 +113,7 @@ func runDelete(cmd *cobra.Command, args []string) { } } +// Deletes one or more profiles func DeleteProfiles(profiles []*pkg_config.Profile) []error { var errs []error for _, profile := range profiles { @@ -223,7 +224,7 @@ func deleteInvalidProfile(profile *pkg_config.Profile) []error { } } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { err := os.RemoveAll(pathToMachine) if err != nil { @@ -248,6 +249,7 @@ func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsN return nil } +// Handles deletion error from DeleteProfiles func HandleDeletionErrors(errors []error) { if len(errors) == 1 { handleSingleDeletionError(errors[0]) diff --git a/cmd/minikube/cmd/delete_test.go b/cmd/minikube/cmd/delete_test.go index a377c3135ebc..d76e7e614877 100644 --- a/cmd/minikube/cmd/delete_test.go +++ b/cmd/minikube/cmd/delete_test.go @@ -22,6 +22,7 @@ import ( "path/filepath" "testing" + "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" ) @@ -60,7 +61,7 @@ func TestDeleteProfileWithValidConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -108,7 +109,7 @@ func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -156,7 +157,7 @@ func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -204,7 +205,7 @@ func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -252,7 +253,7 @@ func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -300,7 +301,7 @@ func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -348,7 +349,7 @@ func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } @@ -396,7 +397,7 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := constants.GetMachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } diff --git a/pkg/minikube/cluster/machine.go b/pkg/minikube/cluster/machine.go index cd28295ee25d..e674bfe095fc 100644 --- a/pkg/minikube/cluster/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -30,6 +30,7 @@ type Machine struct { *host.Host } +// IsValid checks if the machine has the essential info needed for a machine func (h *Machine) IsValid() bool { if h == nil { return false @@ -57,6 +58,8 @@ func (h *Machine) IsValid() bool { return true } +// ListsMachines return all valid and invalid machines +// If a machine is valid or invalid is determined by the cluster.IsValid function func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines []*Machine, err error) { pDirs, err := machineDirs(miniHome...) if err != nil { @@ -77,6 +80,7 @@ func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines return validMachines, inValidMachines, nil } +// Loads a machine or throws an error if the machine could not be loadedG func LoadMachine(name string) (*Machine, error) { api, err := machine.NewAPIClient() if err != nil { @@ -112,3 +116,12 @@ func machineDirs(miniHome ...string) (dirs []string, err error) { } return dirs, err } + +// MachinePath returns the Minikube machine path of a machine +func MachinePath(machine string, miniHome ...string) string { + miniPath := constants.GetMinipath() + if len(miniHome) > 0 { + miniPath = miniHome[0] + } + return filepath.Join(miniPath, "machines", machine) +} diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 4378af264a8f..6bc072b91c27 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -210,15 +210,6 @@ func GetProfilePath(profile string, miniHome ...string) string { return filepath.Join(miniPath, "profiles", profile) } -// GetMachinePath returns the Minikube machine path of a machine -func GetMachinePath(machine string, miniHome ...string) string { - miniPath := GetMinipath() - if len(miniHome) > 0 { - miniPath = miniHome[0] - } - return filepath.Join(miniPath, "machines", machine) -} - // AddonsPath is the default path of the addons configuration const AddonsPath = "/etc/kubernetes/addons" From 79e8250da454c95c59e007025665754ec3015302 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 21 Sep 2019 14:39:35 +0200 Subject: [PATCH 43/55] Use localpath --- cmd/minikube/cmd/delete.go | 6 +- cmd/minikube/cmd/delete_test.go | 142 +++++++++--------- pkg/minikube/cluster/machine.go | 6 +- pkg/minikube/cluster/machine_test.go | 8 +- .../.minikube/machines/p1/config.json | 80 ---------- .../p2_empty_profile_config/config.json | 80 ---------- .../p3_invalid_profile_config/config.json | 80 ---------- .../p4_partial_profile_config/config.json | 80 ---------- .../p6_empty_machine_config/config.json | 0 .../p7_invalid_machine_config/config.json | 1 - .../p8_partial_machine_config/config.json | 72 --------- .../.minikube/profiles/p1/config.json | 49 ------ .../p2_empty_profile_config/config.json | 0 .../p3_invalid_profile_config/config.json | 1 - .../p4_partial_profile_config/config.json | 47 ------ .../p5_missing_machine_config/config.json | 49 ------ .../p6_empty_machine_config/config.json | 49 ------ .../p7_invalid_machine_config/config.json | 49 ------ .../p8_partial_machine_config/config.json | 49 ------ .../.minikube/machines/p1/config.json | 80 ---------- .../p2_empty_profile_config/config.json | 80 ---------- .../p3_invalid_profile_config/config.json | 80 ---------- .../p4_partial_profile_config/config.json | 80 ---------- .../p6_empty_machine_config/config.json | 0 .../p7_invalid_machine_config/config.json | 1 - .../p8_partial_machine_config/config.json | 72 --------- .../.minikube/profiles/p1/config.json | 49 ------ .../p2_empty_profile_config/config.json | 0 .../p3_invalid_profile_config/config.json | 1 - .../p4_partial_profile_config/config.json | 47 ------ .../p5_missing_machine_config/config.json | 49 ------ .../p6_empty_machine_config/config.json | 49 ------ .../p7_invalid_machine_config/config.json | 49 ------ .../p8_partial_machine_config/config.json | 49 ------ 34 files changed, 81 insertions(+), 1453 deletions(-) delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index e9ab1d7e62dd..7acdf1f6bc36 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -185,7 +185,7 @@ func deleteProfile(profile *pkg_config.Profile) error { } // In case DeleteHost didn't complete the job. - machineDir := filepath.Join(localpath.MiniPath(), "machines", profile) + machineDir := filepath.Join(localpath.MiniPath(), "machines", profile.Name) if _, err := os.Stat(machineDir); err == nil { out.T(out.DeletingHost, `Removing {{.directory}} ...`, out.V{"directory": machineDir}) err := os.RemoveAll(machineDir) @@ -220,7 +220,7 @@ func deleteInvalidProfile(profile *pkg_config.Profile) []error { out.T(out.DeletingHost, "Trying to delete invalid profile {{.profile}}", out.V{"profile": profile.Name}) var errs []error - pathToProfile := pkg_config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := pkg_config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { err := os.RemoveAll(pathToProfile) if err != nil { @@ -228,7 +228,7 @@ func deleteInvalidProfile(profile *pkg_config.Profile) []error { } } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { err := os.RemoveAll(pathToMachine) if err != nil { diff --git a/cmd/minikube/cmd/delete_test.go b/cmd/minikube/cmd/delete_test.go index 4297be98128d..b5304c785244 100644 --- a/cmd/minikube/cmd/delete_test.go +++ b/cmd/minikube/cmd/delete_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/localpath" ) func TestDeleteProfileWithValidConfig(t *testing.T) { @@ -35,15 +35,15 @@ func TestDeleteProfileWithValidConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p1" @@ -56,21 +56,21 @@ func TestDeleteProfileWithValidConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -83,15 +83,15 @@ func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p2_empty_profile_config" @@ -104,21 +104,21 @@ func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -131,15 +131,15 @@ func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p3_invalid_profile_config" @@ -152,21 +152,21 @@ func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -179,15 +179,15 @@ func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p4_partial_profile_config" @@ -200,21 +200,21 @@ func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -227,15 +227,15 @@ func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p5_missing_machine_config" @@ -248,21 +248,21 @@ func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != numberOfMachineDirs { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != numberOfMachineDirs { t.Fatal("Deleted a machine config when it should not") } } @@ -275,15 +275,15 @@ func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p6_empty_machine_config" @@ -296,21 +296,21 @@ func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -323,15 +323,15 @@ func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p7_invalid_machine_config" @@ -344,21 +344,21 @@ func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -371,15 +371,15 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) profileToDelete := "p8_partial_machine_config" @@ -392,21 +392,21 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { t.Fatal("Errors while deleting profiles") } - pathToProfile := config.ProfileFolderPath(profile.Name, constants.GetMinipath()) + pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToProfile); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - pathToMachine := cluster.MachinePath(profile.Name, constants.GetMinipath()) + pathToMachine := cluster.MachinePath(profile.Name, localpath.MiniPath()) if _, err := os.Stat(pathToMachine); !os.IsNotExist(err) { t.Fatalf("Profile folder of profile \"%s\" was not deleted", profile.Name) } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")); len(files) != (numberOfProfileDirs - 1) { t.Fatal("Did not delete exactly one profile") } - if files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")); len(files) != (numberOfMachineDirs - 1) { + if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } } @@ -422,15 +422,15 @@ func TestDeleteAllProfiles(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs := len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) if numberOfTotalProfileDirs != numberOfProfileDirs { @@ -458,10 +458,10 @@ func TestDeleteAllProfiles(t *testing.T) { t.Errorf("errors while deleting all profiles: %v", errs) } - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "profiles")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "profiles")) numberOfProfileDirs = len(files) - files, _ = ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ = ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs = len(files) if numberOfProfileDirs != 0 { diff --git a/pkg/minikube/cluster/machine.go b/pkg/minikube/cluster/machine.go index e674bfe095fc..8a24b04e3c66 100644 --- a/pkg/minikube/cluster/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -22,7 +22,7 @@ import ( "github.com/docker/machine/libmachine/host" "github.com/pkg/errors" - "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/localpath" "k8s.io/minikube/pkg/minikube/machine" ) @@ -103,7 +103,7 @@ func LoadMachine(name string) (*Machine, error) { } func machineDirs(miniHome ...string) (dirs []string, err error) { - miniPath := constants.GetMinipath() + miniPath := localpath.MiniPath() if len(miniHome) > 0 { miniPath = miniHome[0] } @@ -119,7 +119,7 @@ func machineDirs(miniHome ...string) (dirs []string, err error) { // MachinePath returns the Minikube machine path of a machine func MachinePath(machine string, miniHome ...string) string { - miniPath := constants.GetMinipath() + miniPath := localpath.MiniPath() if len(miniHome) > 0 { miniPath = miniHome[0] } diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index 5a9e2c7107d8..7c6d6e7262c7 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -22,7 +22,7 @@ import ( "path/filepath" "testing" - "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/localpath" ) func TestListMachines(t *testing.T) { @@ -39,12 +39,12 @@ func TestListMachines(t *testing.T) { t.Errorf("error getting dir path for %s : %v", testMinikubeDir, err) } - err = os.Setenv(constants.MinikubeHome, miniDir) + err = os.Setenv(localpath.MinikubeHome, miniDir) if err != nil { - t.Errorf("error setting up test environment. could not set %s", constants.MinikubeHome) + t.Errorf("error setting up test environment. could not set %s", localpath.MinikubeHome) } - files, _ := ioutil.ReadDir(filepath.Join(constants.GetMinipath(), "machines")) + files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) validMachines, inValidMachines, err := ListMachines() diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json deleted file mode 100644 index 90a026a01c51..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.50", - "MachineName": "p1", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p1" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json deleted file mode 100644 index a9e6592c7afd..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.52", - "MachineName": "p2_empty_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p2_empty_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json deleted file mode 100644 index 8d23c98dc6b9..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.53", - "MachineName": "p3_invalid_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p3_invalid_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json deleted file mode 100644 index 14b416d3c2cf..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.54", - "MachineName": "p4_partial_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p4_partial_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json deleted file mode 100644 index 581f9e648f6b..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json deleted file mode 100644 index d4525a7861ff..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, -} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json deleted file mode 100644 index 00655266e652..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.50", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json deleted file mode 100644 index 9e2e347718f9..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json deleted file mode 100644 index 29f62c014986..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "XhyveDiskDriver": "ahci-hd", - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json deleted file mode 100644 index 1e0980752aa7..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.55", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json deleted file mode 100644 index a1557f6df1b4..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.57", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json deleted file mode 100644 index ea47981d2928..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.59", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json deleted file mode 100644 index 789b9b55576f..000000000000 --- a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.60", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json deleted file mode 100644 index 90a026a01c51..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.50", - "MachineName": "p1", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p1" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json deleted file mode 100644 index a9e6592c7afd..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.52", - "MachineName": "p2_empty_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p2_empty_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json deleted file mode 100644 index 8d23c98dc6b9..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.53", - "MachineName": "p3_invalid_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p3_invalid_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json deleted file mode 100644 index 14b416d3c2cf..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "IPAddress": "192.168.64.54", - "MachineName": "p4_partial_profile_config", - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "DriverName": "hyperkit", - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", - "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", - "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, - "Name": "p4_partial_profile_config" -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json deleted file mode 100644 index 581f9e648f6b..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json deleted file mode 100644 index d4525a7861ff..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "ConfigVersion": 3, - "Driver": { - "SSHUser": "docker", - "SSHPort": 22, - "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", - "StorePath": "/Users/someuser/.minikube", - "SwarmMaster": false, - "SwarmHost": "", - "SwarmDiscovery": "", - "DiskSize": 20000, - "CPU": 2, - "Memory": 2000, - "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", - "NFSShares": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", - "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", - "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", - "Initrd": "initrd", - "Vmlinuz": "bzImage" - }, - "HostOptions": { - "Driver": "", - "Memory": 0, - "Disk": 0, - "EngineOptions": { - "ArbitraryFlags": null, - "Dns": null, - "GraphDir": "", - "Env": null, - "Ipv6": false, - "InsecureRegistry": [ - "10.96.0.0/12" - ], - "Labels": null, - "LogLevel": "", - "StorageDriver": "", - "SelinuxEnabled": false, - "TlsVerify": false, - "RegistryMirror": null, - "InstallURL": "" - }, - "SwarmOptions": { - "IsSwarm": false, - "Address": "", - "Discovery": "", - "Agent": false, - "Master": false, - "Host": "tcp://0.0.0.0:3376", - "Image": "swarm:latest", - "Strategy": "spread", - "Heartbeat": 0, - "Overcommit": 0, - "ArbitraryFlags": null, - "ArbitraryJoinFlags": null, - "Env": null, - "IsExperimental": false - }, - "AuthOptions": { - "CertDir": "/Users/someuser/.minikube", - "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", - "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", - "CaCertRemotePath": "", - "ServerCertRemotePath": "", - "ServerKeyRemotePath": "", - "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", - "ServerCertSANs": null, - "StorePath": "/Users/someuser/.minikube" - } - }, -} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json deleted file mode 100644 index 00655266e652..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.50", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json deleted file mode 100644 index 9e2e347718f9..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json +++ /dev/null @@ -1 +0,0 @@ -invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json deleted file mode 100644 index 29f62c014986..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "XhyveDiskDriver": "ahci-hd", - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json deleted file mode 100644 index 1e0980752aa7..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.55", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json deleted file mode 100644 index a1557f6df1b4..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.57", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json deleted file mode 100644 index ea47981d2928..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.59", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json deleted file mode 100644 index 789b9b55576f..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "MachineConfig": { - "KeepContext": false, - "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", - "Memory": 2000, - "CPUs": 2, - "DiskSize": 20000, - "VMDriver": "hyperkit", - "ContainerRuntime": "docker", - "HyperkitVpnKitSock": "", - "HyperkitVSockPorts": [], - "DockerEnv": null, - "InsecureRegistry": null, - "RegistryMirror": null, - "HostOnlyCIDR": "192.168.99.1/24", - "HypervVirtualSwitch": "", - "KVMNetwork": "default", - "KVMQemuURI": "qemu:///system", - "KVMGPU": false, - "KVMHidden": false, - "DockerOpt": null, - "DisableDriverMounts": false, - "NFSShare": [], - "NFSSharesRoot": "/nfsshares", - "UUID": "", - "NoVTXCheck": false, - "DNSProxy": false, - "HostDNSResolver": true - }, - "KubernetesConfig": { - "KubernetesVersion": "v1.15.0", - "NodeIP": "192.168.64.60", - "NodePort": 8443, - "NodeName": "minikube", - "APIServerName": "minikubeCA", - "APIServerNames": null, - "APIServerIPs": null, - "DNSDomain": "cluster.local", - "ContainerRuntime": "docker", - "CRISocket": "", - "NetworkPlugin": "", - "FeatureGates": "", - "ServiceCIDR": "10.96.0.0/12", - "ImageRepository": "", - "ExtraOptions": null, - "ShouldLoadCachedImages": true, - "EnableDefaultCNI": false - } -} From 02bea609cfa87e398384426f95e977ff59393a27 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 21 Sep 2019 14:45:48 +0200 Subject: [PATCH 44/55] Readded testdata --- .../.minikube/machines/p1/config.json | 80 +++++++++++++++++++ .../p2_empty_profile_config/config.json | 80 +++++++++++++++++++ .../p3_invalid_profile_config/config.json | 80 +++++++++++++++++++ .../p4_partial_profile_config/config.json | 80 +++++++++++++++++++ .../p6_empty_machine_config/config.json | 0 .../p7_invalid_machine_config/config.json | 1 + .../p8_partial_machine_config/config.json | 72 +++++++++++++++++ .../.minikube/profiles/p1/config.json | 49 ++++++++++++ .../p2_empty_profile_config/config.json | 0 .../p3_invalid_profile_config/config.json | 1 + .../p4_partial_profile_config/config.json | 47 +++++++++++ .../p5_missing_machine_config/config.json | 49 ++++++++++++ .../p6_empty_machine_config/config.json | 49 ++++++++++++ .../p7_invalid_machine_config/config.json | 49 ++++++++++++ .../p8_partial_machine_config/config.json | 49 ++++++++++++ .../delete-single/.minikube/certs/ca-key.pem | 27 +++++++ .../delete-single/.minikube/certs/ca.pem | 18 +++++ .../delete-single/.minikube/certs/cert.pem | 18 +++++ .../delete-single/.minikube/certs/key.pem | 27 +++++++ 19 files changed, 776 insertions(+) create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json new file mode 100644 index 000000000000..90a026a01c51 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p1/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p1", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p1" +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json new file mode 100644 index 000000000000..a9e6592c7afd --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p2_empty_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.52", + "MachineName": "p2_empty_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p2_empty_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json new file mode 100644 index 000000000000..8d23c98dc6b9 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p3_invalid_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.53", + "MachineName": "p3_invalid_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p3_invalid_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json new file mode 100644 index 000000000000..14b416d3c2cf --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p4_partial_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.54", + "MachineName": "p4_partial_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p4_partial_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p6_empty_machine_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p7_invalid_machine_config/config.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json new file mode 100644 index 000000000000..d4525a7861ff --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/machines/p8_partial_machine_config/config.json @@ -0,0 +1,72 @@ +{ + "ConfigVersion": 3, + "Driver": { + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, +} diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json new file mode 100644 index 000000000000..00655266e652 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.50", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p2_empty_profile_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json new file mode 100644 index 000000000000..9e2e347718f9 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p3_invalid_profile_config/config.json @@ -0,0 +1 @@ +invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json new file mode 100644 index 000000000000..29f62c014986 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json @@ -0,0 +1,47 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "XhyveDiskDriver": "ahci-hd", + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json new file mode 100644 index 000000000000..1e0980752aa7 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.55", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json new file mode 100644 index 000000000000..a1557f6df1b4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.57", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json new file mode 100644 index 000000000000..ea47981d2928 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.59", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json new file mode 100644 index 000000000000..789b9b55576f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.60", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem new file mode 100644 index 000000000000..441bc472fcf1 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEA1B/BgbWm6z9UdvzyiFnh0u6aH33VjqYpVfkYQoM71LnOV1yW +XeUTs691ojgXJn9WC+ztD3wxTZnRFoVPOI+gdT/oQZp7LL42HGGNVeyGqTjhEtAn +uMK3BXRQwMfJstX7zRDAyk3xzljEeUa8N/N1hTNiKTQ0G1StnN7q/ZM50jUO0C0V +NeU3a0FHxWFZzuaz5TwTfRpSFG9+v7mTPsWlIVzG3HU3UWwMsp2YQlnlwN/jM4qI +BMobLBVgcRCZit9ZIxCgzVElDoTctFj4CaNB5bhylD4rLCUiJ3Bt0KPqk7XlrZbk +9DLvJox131VSXHgseMKDo+p9Ez/Y9sQw5zP+gwIDAQABAoIBABNC+vBLTWfpLUNM +vr0w5DeiIO6hH4Y/gltjLhfEEOfFI359Us4d4gcb9KORUlDVmTul/PS+A0AXqovP ++RyatihPcEicvXiXoRQ8q3fU7XlqR83Mhv7Y94OQR1DqE1+g3KeHUOpN35osJ1MX +4Dl4awB4ZP521hBxRP6Mo2v5NXPn4P1G47bxE+aZJ1i7wXlgswcVZvEPxWHVCRGx +94tV2AdCcggWsXHN1omFFCRDoCo7e4EiLkral2r3pD0qq0tI/6Zy4AC/Y6xhCMlj +Ovu/kE+r40Rtak4fhyUnEIi32PmQUUxBUN8o2z+m3qznQDRJlg0IBXwZI5XBycTA +V2YaewkCgYEA1PIjstthnp6YdeWmJ/sEexflfUO+jsg6FNBnITUbOXfQ1tOKJs44 +FXpIJQ7BLWalW0VeQJnaPOoS871YovHK85h0N68q5quDKCkVMLTkFyfPc9quJKLW +LGSrA6pNj7Ez1BEf2Z2r3TI0TIWWJ48d3hf2LHdmTzBGSbsuTc+XaJcCgYEA/wMU +kbk/op8Z35n+o02o/ZNf4KsRPJUbLVWH/hdfKp1aJz84AC/zd5H/8d/vxSKJF9eP +HbBUeb5qN9dXaT4riwiskOHzStQzFS/v1agtl3ArB769CKoCYF+FB7vk+QtRzv6m +DrdJaGYULdWOQEm6DLTEJRiHdlVX9hvKXNBhCvUCgYBEElujE0ozgJNQLOdepHmc +N9len8dMsWkPukcdcHKRfmG+KsVg/k8jXoGthvft4YA+mwA0OnpvOoxwajjpbc3o +7PVJz68xKea1cdyaQ1kepdVFPcSpZXx9mHiqpUhCBO2Cfy7lS+fiv+fEBngnkTKF +CrfhIxILgm0VqMZ2jUPjZQKBgDXWZKVPQswGYuP+EvBPGPpP/tHjy8PKhu5PPGK8 +dG7+wWW/xwbjGLeJr0tVR72KyP6rl59g9rStKqeXYvDpGzBDKIt96GtH2XEDqdKl +qtpp5+u+rRIDMnU+NUuos3KQnTjiMhSxRWIxCtmSWHHiHtFH6JEcWJz275cZzuNB +avtxAoGAAZ3JVCfOtMv2zVs4cG4QiC24nHhx5JjZDWXNrjJQywpXb0uBorHjBwS9 +4k1NBcPcYdU5PYopkeQefkxHLI0LvzpfJXOq1BamadMbiJGwArZc5pHlgnZ6PylS +WvE3WoQMgaY9szU1AMZudoylGnJByKNC3w3wdm4/YB2TSfJcd1M= +-----END RSA PRIVATE KEY----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem new file mode 100644 index 000000000000..df3eece0cf14 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC3DCCAcSgAwIBAgIRAPwzER0vgZZZ/QdTg3sTODowDQYJKoZIhvcNAQELBQAw +FzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MB4XDTE5MDcwNzE0MTMwMFoXDTIyMDYy +MTE0MTMwMFowFzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEA1B/BgbWm6z9UdvzyiFnh0u6aH33VjqYpVfkYQoM7 +1LnOV1yWXeUTs691ojgXJn9WC+ztD3wxTZnRFoVPOI+gdT/oQZp7LL42HGGNVeyG +qTjhEtAnuMK3BXRQwMfJstX7zRDAyk3xzljEeUa8N/N1hTNiKTQ0G1StnN7q/ZM5 +0jUO0C0VNeU3a0FHxWFZzuaz5TwTfRpSFG9+v7mTPsWlIVzG3HU3UWwMsp2YQlnl +wN/jM4qIBMobLBVgcRCZit9ZIxCgzVElDoTctFj4CaNB5bhylD4rLCUiJ3Bt0KPq +k7XlrZbk9DLvJox131VSXHgseMKDo+p9Ez/Y9sQw5zP+gwIDAQABoyMwITAOBgNV +HQ8BAf8EBAMCAqwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEA +OP+dMVX9Jxu1XzbtfpKKfuu7zspeQGctrUXtQMQ6CcYPTanrtZP8toxuF6C+Etvx +Xz0GBImMcPhvH2SjU39PPTdHolhAoDXbVDV3P9RAHKiK1r5bUoTyJVZCSO4YRqI3 +ykhAM0qPF9pt3IZJEWW5QK+IC96jLNVSos7oAs05bdedsl9WiIp4xAPpTvtJo+JR +0pOWAEfJBeIhiaSDYyZzF//wmtbjPe5Atz6zmAQNVYk64UqhKpyZ5CR4MHsAUa+E +r81A548vbOw6HG9adfmvzhBbocRBIoqUIEPGky7nYVFAgUpf1lDyovy6QNDRuyRb +YOYsH41aipc56Hbm3prb+g== +-----END CERTIFICATE----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem new file mode 100644 index 000000000000..e7f152a07e61 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC+jCCAeKgAwIBAgIRAJA5fD0w22hA22aKxvTXmZcwDQYJKoZIhvcNAQELBQAw +FzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MB4XDTE5MDcwNzE0MTMwMFoXDTIyMDYy +MTE0MTMwMFowIzEhMB8GA1UECgwYbWFyZWtzY2h3YXJ6Ljxib290c3RyYXA+MIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1uJIfWVJQ5P+050xzTwZtU8y +VU5Izsb+guJOgfrMxgTwRxSOkuJEW+sWpZVPY9KJ9EqDHIK1V4Vi5WoeuTwYj17Q +/6mTaAG7rVpsG2FU5LzjP8Jhn9XRaKtKjYIy200Rn0i2djkOger0hudRx1utNXkw +tc3N7EpWMTJ/5KeR+lKJn3JdgLTVn/NAbXYK08eghoJ8qogl6kkCuzKWOtTPu5ab +LrGO40VF8n0wz7UE4GVO60l9M/4yCrG7nYV5glSZzbeiEzF1GGh4FgRalIyEbnTc +APqqVwTxqnzsU+bfjYOGIjc3ZooPcJyAml4nX6NUAtlJvPo2p0I8jDOeY/+MawID +AQABozUwMzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDAYD +VR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAcaY46IMMeIh7NjIm2Ke01K9l +kuW8Br8LitNNTBQn9D5jrQwTYhmyPpkQxQaepIGNFYDju6DI9r1uQ/PaB+kstw/3 +sgIMgA8yaqvW0HCYQZD4fOq7Zfzx7max1eb8S+666yNuAxRmLBuw+/uv+RVkA3tl +ALx0t+dqTJ0q7STtcroTL9hB3BIwt3x1sS4v3NJJwxf6/V1pmIvaqVEgLj0FqVoQ +zbsgYHJoxJw6Rvfgz7X+EsZCiLzbl4JoXMjMIg06g7vKVOknamTruUe/1O9tRxRk +gjFZ6K4NvaSBB2ASnSaJK3ixHbxlmpu+NCOal0rd5ZUL5Ud87JlGR3F92+8doA== +-----END CERTIFICATE----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem new file mode 100644 index 000000000000..cd0043ac2cbb --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA1uJIfWVJQ5P+050xzTwZtU8yVU5Izsb+guJOgfrMxgTwRxSO +kuJEW+sWpZVPY9KJ9EqDHIK1V4Vi5WoeuTwYj17Q/6mTaAG7rVpsG2FU5LzjP8Jh +n9XRaKtKjYIy200Rn0i2djkOger0hudRx1utNXkwtc3N7EpWMTJ/5KeR+lKJn3Jd +gLTVn/NAbXYK08eghoJ8qogl6kkCuzKWOtTPu5abLrGO40VF8n0wz7UE4GVO60l9 +M/4yCrG7nYV5glSZzbeiEzF1GGh4FgRalIyEbnTcAPqqVwTxqnzsU+bfjYOGIjc3 +ZooPcJyAml4nX6NUAtlJvPo2p0I8jDOeY/+MawIDAQABAoIBAEz1B38ZOi7gnt/M +qVxWTOK5NU6F1d9wNxBK2lEEsDeu5xqdyx3huReuTxMIMUGP0mZSFTituyJYG/4L +jmtKkYUvMOyPH8Kc9Ej2XEdGCXBOEZjxFaN3oSK6Td32Jh6SMGB6WxZmAsMWkXKK +/6fFNngzKfXCeiBI0yuVaWZLeSVLqAhkX6u+DPjkPLHZUaSabPgh15W7Edc643/2 +uKg2pKa+MJL7KftktjruS/fSwU6bHUmklJj1IZPIKf3NNXkrER5lQ8F9zFU5Ahcx +BD6LyHahmC894VL8hJlrBn7kbYNX1rISMtnSbnXZUhakmNqoYkpor9h0Lg97v/SD +nYKCABECgYEA50K0akS4LErSwd2n787aKOkIJ1Jm/PbNRfUKxei7FSVknTej1EpJ +8ivUGb3qJ4MKl3mbnDAQj7uNVlyi2YKFA83excHud4H3M6flg1vTbh5KjyEZoahX +aExlURDgENYGqj1d7IvxeaPp7h5pm2Y4ATL7ccGnc6wY9zdvc3k3WQMCgYEA7d8W +iWbVPxOP7POKDQmHlsJ6Cr6YKS1IbCwflUJ02+SIGZc/rDzf9GAuykhJhvRyDEgt +4b2BFLmvcQAxdVZrB8x+DruLi97JDhEuGxngotin4B8xpFaz/4OB8MYyKKBUAvQC +ww+A0MgyABFoTx71c4ZJpX3IVZY34auXXzytfnkCgYEA0hTPrkX1BQ+Hu+NvHrNL +jaR76rS5qA1P1sBO5BCSexg3+XZFFqHR4PQdvrC+mNw67/Xh/ZXQRbH8KDsJGQyv +ZxBK0l1lEx12gm+AWL8/J6bO1o0cKrWxiab01xq8Ya776QTMYQmT+IuGA/GOwEOw +lq5Iq0Nfqf3pxBKQ5VZ1iB8CgYEAzAAQJuR/K+pN+6vdkFLE6uF8ouxUOLQyMTsi +FvL4n4D9y9yv6boHY2B9oFOgY1IO4UOhvcC1DB43PRUqVXQ4tGaHEYF8Kwd0rFDF +ls55nY9rYcW+4C7Pjemtrd18NOVTR3kXSUxpcCTQ5MgJChoF7P6U+I3IGsaKxEpR +toamUBkCgYAlB3eT1EQMJd99qJsP/WSQW1ydtithyY3a8Iwv/M6+ITQDbdoprW1J +tCLVpyDzos8EKkqSEULmcfoQzTaMiPPFJJ08LX0JX9B8q1wlN3ReZNccUhQH4vaC +X5eFyKNxrz9tb1uQmUkifFH44XiKBjyijM1jFqYxlxAUUrAodt1o8Q== +-----END RSA PRIVATE KEY----- From 42c017f5d6839e281a3702db5b1af85250b14e5c Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 21 Sep 2019 14:47:02 +0200 Subject: [PATCH 45/55] Readded testdata --- .../.minikube/machines/p1/config.json | 80 +++++++++++++++++++ .../p2_empty_profile_config/config.json | 80 +++++++++++++++++++ .../p3_invalid_profile_config/config.json | 80 +++++++++++++++++++ .../p4_partial_profile_config/config.json | 80 +++++++++++++++++++ .../p6_empty_machine_config/config.json | 0 .../p7_invalid_machine_config/config.json | 1 + .../p8_partial_machine_config/config.json | 72 +++++++++++++++++ .../.minikube/profiles/p1/config.json | 49 ++++++++++++ .../p2_empty_profile_config/config.json | 0 .../p3_invalid_profile_config/config.json | 1 + .../p4_partial_profile_config/config.json | 47 +++++++++++ .../p5_missing_machine_config/config.json | 49 ++++++++++++ .../p6_empty_machine_config/config.json | 49 ++++++++++++ .../p7_invalid_machine_config/config.json | 49 ++++++++++++ .../p8_partial_machine_config/config.json | 49 ++++++++++++ 15 files changed, 686 insertions(+) create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json create mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json new file mode 100644 index 000000000000..90a026a01c51 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p1/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.50", + "MachineName": "p1", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p1/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p1", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "5e6787b6-aecb-11e9-81cf-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p1/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p1" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json new file mode 100644 index 000000000000..a9e6592c7afd --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p2_empty_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.52", + "MachineName": "p2_empty_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p2_empty_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p2_empty_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "ddd37c1c-aedf-11e9-afa7-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p2_empty_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p2_empty_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json new file mode 100644 index 000000000000..8d23c98dc6b9 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p3_invalid_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.53", + "MachineName": "p3_invalid_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p3_invalid_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "759044c8-aee4-11e9-bd0a-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p3_invalid_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p3_invalid_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json new file mode 100644 index 000000000000..14b416d3c2cf --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p4_partial_profile_config/config.json @@ -0,0 +1,80 @@ +{ + "ConfigVersion": 3, + "Driver": { + "IPAddress": "192.168.64.54", + "MachineName": "p4_partial_profile_config", + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p4_partial_profile_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "Boot2DockerURL": "file:///Users/someuser/.minikube/cache/iso/minikube-v1.2.0.iso", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p4_partial_profile_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "faf8face-aee4-11e9-9ba1-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p4_partial_profile_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "DriverName": "hyperkit", + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertPath": "/Users/someuser/.minikube/machines/server.pem", + "ServerKeyPath": "/Users/someuser/.minikube/machines/server-key.pem", + "ClientKeyPath": "/Users/someuser/.minikube/certs/key.pem", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, + "Name": "p4_partial_profile_config" +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p6_empty_machine_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json new file mode 100644 index 000000000000..581f9e648f6b --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p7_invalid_machine_config/config.json @@ -0,0 +1 @@ +invalid json file :) diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json new file mode 100644 index 000000000000..d4525a7861ff --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/machines/p8_partial_machine_config/config.json @@ -0,0 +1,72 @@ +{ + "ConfigVersion": 3, + "Driver": { + "SSHUser": "docker", + "SSHPort": 22, + "SSHKeyPath": "/Users/someuser/.minikube/machines/p8_partial_machine_config/id_rsa", + "StorePath": "/Users/someuser/.minikube", + "SwarmMaster": false, + "SwarmHost": "", + "SwarmDiscovery": "", + "DiskSize": 20000, + "CPU": 2, + "Memory": 2000, + "Cmdline": "loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes base host=p8_partial_machine_config", + "NFSShares": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "4f16872c-aee8-11e9-8815-8c8590c3b8b4", + "BootKernel": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/bzImage", + "BootInitrd": "/Users/someuser/.minikube/machines/p8_partial_machine_config/b2d-image/boot/initrd", + "Initrd": "initrd", + "Vmlinuz": "bzImage" + }, + "HostOptions": { + "Driver": "", + "Memory": 0, + "Disk": 0, + "EngineOptions": { + "ArbitraryFlags": null, + "Dns": null, + "GraphDir": "", + "Env": null, + "Ipv6": false, + "InsecureRegistry": [ + "10.96.0.0/12" + ], + "Labels": null, + "LogLevel": "", + "StorageDriver": "", + "SelinuxEnabled": false, + "TlsVerify": false, + "RegistryMirror": null, + "InstallURL": "" + }, + "SwarmOptions": { + "IsSwarm": false, + "Address": "", + "Discovery": "", + "Agent": false, + "Master": false, + "Host": "tcp://0.0.0.0:3376", + "Image": "swarm:latest", + "Strategy": "spread", + "Heartbeat": 0, + "Overcommit": 0, + "ArbitraryFlags": null, + "ArbitraryJoinFlags": null, + "Env": null, + "IsExperimental": false + }, + "AuthOptions": { + "CertDir": "/Users/someuser/.minikube", + "CaCertPath": "/Users/someuser/.minikube/certs/ca.pem", + "CaPrivateKeyPath": "/Users/someuser/.minikube/certs/ca-key.pem", + "CaCertRemotePath": "", + "ServerCertRemotePath": "", + "ServerKeyRemotePath": "", + "ClientCertPath": "/Users/someuser/.minikube/certs/cert.pem", + "ServerCertSANs": null, + "StorePath": "/Users/someuser/.minikube" + } + }, +} diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json new file mode 100644 index 000000000000..00655266e652 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.50", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p2_empty_profile_config/config.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json new file mode 100644 index 000000000000..9e2e347718f9 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p3_invalid_profile_config/config.json @@ -0,0 +1 @@ +invalid json file :) \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json new file mode 100644 index 000000000000..29f62c014986 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json @@ -0,0 +1,47 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "XhyveDiskDriver": "ahci-hd", + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json new file mode 100644 index 000000000000..1e0980752aa7 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.55", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json new file mode 100644 index 000000000000..a1557f6df1b4 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.57", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json new file mode 100644 index 000000000000..ea47981d2928 --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.59", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} \ No newline at end of file diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json new file mode 100644 index 000000000000..789b9b55576f --- /dev/null +++ b/pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json @@ -0,0 +1,49 @@ +{ + "MachineConfig": { + "KeepContext": false, + "MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", + "Memory": 2000, + "CPUs": 2, + "DiskSize": 20000, + "VMDriver": "hyperkit", + "ContainerRuntime": "docker", + "HyperkitVpnKitSock": "", + "HyperkitVSockPorts": [], + "DockerEnv": null, + "InsecureRegistry": null, + "RegistryMirror": null, + "HostOnlyCIDR": "192.168.99.1/24", + "HypervVirtualSwitch": "", + "KVMNetwork": "default", + "KVMQemuURI": "qemu:///system", + "KVMGPU": false, + "KVMHidden": false, + "DockerOpt": null, + "DisableDriverMounts": false, + "NFSShare": [], + "NFSSharesRoot": "/nfsshares", + "UUID": "", + "NoVTXCheck": false, + "DNSProxy": false, + "HostDNSResolver": true + }, + "KubernetesConfig": { + "KubernetesVersion": "v1.15.0", + "NodeIP": "192.168.64.60", + "NodePort": 8443, + "NodeName": "minikube", + "APIServerName": "minikubeCA", + "APIServerNames": null, + "APIServerIPs": null, + "DNSDomain": "cluster.local", + "ContainerRuntime": "docker", + "CRISocket": "", + "NetworkPlugin": "", + "FeatureGates": "", + "ServiceCIDR": "10.96.0.0/12", + "ImageRepository": "", + "ExtraOptions": null, + "ShouldLoadCachedImages": true, + "EnableDefaultCNI": false + } +} From 5cabb01a4f0cf946c8ce30437974516c2786b7a1 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 21 Sep 2019 14:55:24 +0200 Subject: [PATCH 46/55] Removed certs --- .../delete-single/.minikube/certs/ca-key.pem | 27 ------------------- .../delete-single/.minikube/certs/ca.pem | 18 ------------- .../delete-single/.minikube/certs/cert.pem | 18 ------------- .../delete-single/.minikube/certs/key.pem | 27 ------------------- 4 files changed, 90 deletions(-) delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem delete mode 100644 pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem deleted file mode 100644 index 441bc472fcf1..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA1B/BgbWm6z9UdvzyiFnh0u6aH33VjqYpVfkYQoM71LnOV1yW -XeUTs691ojgXJn9WC+ztD3wxTZnRFoVPOI+gdT/oQZp7LL42HGGNVeyGqTjhEtAn -uMK3BXRQwMfJstX7zRDAyk3xzljEeUa8N/N1hTNiKTQ0G1StnN7q/ZM50jUO0C0V -NeU3a0FHxWFZzuaz5TwTfRpSFG9+v7mTPsWlIVzG3HU3UWwMsp2YQlnlwN/jM4qI -BMobLBVgcRCZit9ZIxCgzVElDoTctFj4CaNB5bhylD4rLCUiJ3Bt0KPqk7XlrZbk -9DLvJox131VSXHgseMKDo+p9Ez/Y9sQw5zP+gwIDAQABAoIBABNC+vBLTWfpLUNM -vr0w5DeiIO6hH4Y/gltjLhfEEOfFI359Us4d4gcb9KORUlDVmTul/PS+A0AXqovP -+RyatihPcEicvXiXoRQ8q3fU7XlqR83Mhv7Y94OQR1DqE1+g3KeHUOpN35osJ1MX -4Dl4awB4ZP521hBxRP6Mo2v5NXPn4P1G47bxE+aZJ1i7wXlgswcVZvEPxWHVCRGx -94tV2AdCcggWsXHN1omFFCRDoCo7e4EiLkral2r3pD0qq0tI/6Zy4AC/Y6xhCMlj -Ovu/kE+r40Rtak4fhyUnEIi32PmQUUxBUN8o2z+m3qznQDRJlg0IBXwZI5XBycTA -V2YaewkCgYEA1PIjstthnp6YdeWmJ/sEexflfUO+jsg6FNBnITUbOXfQ1tOKJs44 -FXpIJQ7BLWalW0VeQJnaPOoS871YovHK85h0N68q5quDKCkVMLTkFyfPc9quJKLW -LGSrA6pNj7Ez1BEf2Z2r3TI0TIWWJ48d3hf2LHdmTzBGSbsuTc+XaJcCgYEA/wMU -kbk/op8Z35n+o02o/ZNf4KsRPJUbLVWH/hdfKp1aJz84AC/zd5H/8d/vxSKJF9eP -HbBUeb5qN9dXaT4riwiskOHzStQzFS/v1agtl3ArB769CKoCYF+FB7vk+QtRzv6m -DrdJaGYULdWOQEm6DLTEJRiHdlVX9hvKXNBhCvUCgYBEElujE0ozgJNQLOdepHmc -N9len8dMsWkPukcdcHKRfmG+KsVg/k8jXoGthvft4YA+mwA0OnpvOoxwajjpbc3o -7PVJz68xKea1cdyaQ1kepdVFPcSpZXx9mHiqpUhCBO2Cfy7lS+fiv+fEBngnkTKF -CrfhIxILgm0VqMZ2jUPjZQKBgDXWZKVPQswGYuP+EvBPGPpP/tHjy8PKhu5PPGK8 -dG7+wWW/xwbjGLeJr0tVR72KyP6rl59g9rStKqeXYvDpGzBDKIt96GtH2XEDqdKl -qtpp5+u+rRIDMnU+NUuos3KQnTjiMhSxRWIxCtmSWHHiHtFH6JEcWJz275cZzuNB -avtxAoGAAZ3JVCfOtMv2zVs4cG4QiC24nHhx5JjZDWXNrjJQywpXb0uBorHjBwS9 -4k1NBcPcYdU5PYopkeQefkxHLI0LvzpfJXOq1BamadMbiJGwArZc5pHlgnZ6PylS -WvE3WoQMgaY9szU1AMZudoylGnJByKNC3w3wdm4/YB2TSfJcd1M= ------END RSA PRIVATE KEY----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem deleted file mode 100644 index df3eece0cf14..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/certs/ca.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC3DCCAcSgAwIBAgIRAPwzER0vgZZZ/QdTg3sTODowDQYJKoZIhvcNAQELBQAw -FzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MB4XDTE5MDcwNzE0MTMwMFoXDTIyMDYy -MTE0MTMwMFowFzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEA1B/BgbWm6z9UdvzyiFnh0u6aH33VjqYpVfkYQoM7 -1LnOV1yWXeUTs691ojgXJn9WC+ztD3wxTZnRFoVPOI+gdT/oQZp7LL42HGGNVeyG -qTjhEtAnuMK3BXRQwMfJstX7zRDAyk3xzljEeUa8N/N1hTNiKTQ0G1StnN7q/ZM5 -0jUO0C0VNeU3a0FHxWFZzuaz5TwTfRpSFG9+v7mTPsWlIVzG3HU3UWwMsp2YQlnl -wN/jM4qIBMobLBVgcRCZit9ZIxCgzVElDoTctFj4CaNB5bhylD4rLCUiJ3Bt0KPq -k7XlrZbk9DLvJox131VSXHgseMKDo+p9Ez/Y9sQw5zP+gwIDAQABoyMwITAOBgNV -HQ8BAf8EBAMCAqwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEA -OP+dMVX9Jxu1XzbtfpKKfuu7zspeQGctrUXtQMQ6CcYPTanrtZP8toxuF6C+Etvx -Xz0GBImMcPhvH2SjU39PPTdHolhAoDXbVDV3P9RAHKiK1r5bUoTyJVZCSO4YRqI3 -ykhAM0qPF9pt3IZJEWW5QK+IC96jLNVSos7oAs05bdedsl9WiIp4xAPpTvtJo+JR -0pOWAEfJBeIhiaSDYyZzF//wmtbjPe5Atz6zmAQNVYk64UqhKpyZ5CR4MHsAUa+E -r81A548vbOw6HG9adfmvzhBbocRBIoqUIEPGky7nYVFAgUpf1lDyovy6QNDRuyRb -YOYsH41aipc56Hbm3prb+g== ------END CERTIFICATE----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem deleted file mode 100644 index e7f152a07e61..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/certs/cert.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+jCCAeKgAwIBAgIRAJA5fD0w22hA22aKxvTXmZcwDQYJKoZIhvcNAQELBQAw -FzEVMBMGA1UEChMMbWFyZWtzY2h3YXJ6MB4XDTE5MDcwNzE0MTMwMFoXDTIyMDYy -MTE0MTMwMFowIzEhMB8GA1UECgwYbWFyZWtzY2h3YXJ6Ljxib290c3RyYXA+MIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1uJIfWVJQ5P+050xzTwZtU8y -VU5Izsb+guJOgfrMxgTwRxSOkuJEW+sWpZVPY9KJ9EqDHIK1V4Vi5WoeuTwYj17Q -/6mTaAG7rVpsG2FU5LzjP8Jhn9XRaKtKjYIy200Rn0i2djkOger0hudRx1utNXkw -tc3N7EpWMTJ/5KeR+lKJn3JdgLTVn/NAbXYK08eghoJ8qogl6kkCuzKWOtTPu5ab -LrGO40VF8n0wz7UE4GVO60l9M/4yCrG7nYV5glSZzbeiEzF1GGh4FgRalIyEbnTc -APqqVwTxqnzsU+bfjYOGIjc3ZooPcJyAml4nX6NUAtlJvPo2p0I8jDOeY/+MawID -AQABozUwMzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDAYD -VR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAcaY46IMMeIh7NjIm2Ke01K9l -kuW8Br8LitNNTBQn9D5jrQwTYhmyPpkQxQaepIGNFYDju6DI9r1uQ/PaB+kstw/3 -sgIMgA8yaqvW0HCYQZD4fOq7Zfzx7max1eb8S+666yNuAxRmLBuw+/uv+RVkA3tl -ALx0t+dqTJ0q7STtcroTL9hB3BIwt3x1sS4v3NJJwxf6/V1pmIvaqVEgLj0FqVoQ -zbsgYHJoxJw6Rvfgz7X+EsZCiLzbl4JoXMjMIg06g7vKVOknamTruUe/1O9tRxRk -gjFZ6K4NvaSBB2ASnSaJK3ixHbxlmpu+NCOal0rd5ZUL5Ud87JlGR3F92+8doA== ------END CERTIFICATE----- diff --git a/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem b/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem deleted file mode 100644 index cd0043ac2cbb..000000000000 --- a/pkg/minikube/config/testdata/delete-single/.minikube/certs/key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA1uJIfWVJQ5P+050xzTwZtU8yVU5Izsb+guJOgfrMxgTwRxSO -kuJEW+sWpZVPY9KJ9EqDHIK1V4Vi5WoeuTwYj17Q/6mTaAG7rVpsG2FU5LzjP8Jh -n9XRaKtKjYIy200Rn0i2djkOger0hudRx1utNXkwtc3N7EpWMTJ/5KeR+lKJn3Jd -gLTVn/NAbXYK08eghoJ8qogl6kkCuzKWOtTPu5abLrGO40VF8n0wz7UE4GVO60l9 -M/4yCrG7nYV5glSZzbeiEzF1GGh4FgRalIyEbnTcAPqqVwTxqnzsU+bfjYOGIjc3 -ZooPcJyAml4nX6NUAtlJvPo2p0I8jDOeY/+MawIDAQABAoIBAEz1B38ZOi7gnt/M -qVxWTOK5NU6F1d9wNxBK2lEEsDeu5xqdyx3huReuTxMIMUGP0mZSFTituyJYG/4L -jmtKkYUvMOyPH8Kc9Ej2XEdGCXBOEZjxFaN3oSK6Td32Jh6SMGB6WxZmAsMWkXKK -/6fFNngzKfXCeiBI0yuVaWZLeSVLqAhkX6u+DPjkPLHZUaSabPgh15W7Edc643/2 -uKg2pKa+MJL7KftktjruS/fSwU6bHUmklJj1IZPIKf3NNXkrER5lQ8F9zFU5Ahcx -BD6LyHahmC894VL8hJlrBn7kbYNX1rISMtnSbnXZUhakmNqoYkpor9h0Lg97v/SD -nYKCABECgYEA50K0akS4LErSwd2n787aKOkIJ1Jm/PbNRfUKxei7FSVknTej1EpJ -8ivUGb3qJ4MKl3mbnDAQj7uNVlyi2YKFA83excHud4H3M6flg1vTbh5KjyEZoahX -aExlURDgENYGqj1d7IvxeaPp7h5pm2Y4ATL7ccGnc6wY9zdvc3k3WQMCgYEA7d8W -iWbVPxOP7POKDQmHlsJ6Cr6YKS1IbCwflUJ02+SIGZc/rDzf9GAuykhJhvRyDEgt -4b2BFLmvcQAxdVZrB8x+DruLi97JDhEuGxngotin4B8xpFaz/4OB8MYyKKBUAvQC -ww+A0MgyABFoTx71c4ZJpX3IVZY34auXXzytfnkCgYEA0hTPrkX1BQ+Hu+NvHrNL -jaR76rS5qA1P1sBO5BCSexg3+XZFFqHR4PQdvrC+mNw67/Xh/ZXQRbH8KDsJGQyv -ZxBK0l1lEx12gm+AWL8/J6bO1o0cKrWxiab01xq8Ya776QTMYQmT+IuGA/GOwEOw -lq5Iq0Nfqf3pxBKQ5VZ1iB8CgYEAzAAQJuR/K+pN+6vdkFLE6uF8ouxUOLQyMTsi -FvL4n4D9y9yv6boHY2B9oFOgY1IO4UOhvcC1DB43PRUqVXQ4tGaHEYF8Kwd0rFDF -ls55nY9rYcW+4C7Pjemtrd18NOVTR3kXSUxpcCTQ5MgJChoF7P6U+I3IGsaKxEpR -toamUBkCgYAlB3eT1EQMJd99qJsP/WSQW1ydtithyY3a8Iwv/M6+ITQDbdoprW1J -tCLVpyDzos8EKkqSEULmcfoQzTaMiPPFJJ08LX0JX9B8q1wlN3ReZNccUhQH4vaC -X5eFyKNxrz9tb1uQmUkifFH44XiKBjyijM1jFqYxlxAUUrAodt1o8Q== ------END RSA PRIVATE KEY----- From d52730a54f5f875ebd6ca74bea0ca0b8b00070ad Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Sat, 21 Sep 2019 23:32:30 +0200 Subject: [PATCH 47/55] Fixed test errors --- cmd/minikube/cmd/delete_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmd/minikube/cmd/delete_test.go b/cmd/minikube/cmd/delete_test.go index b5304c785244..042b86dd4cc8 100644 --- a/cmd/minikube/cmd/delete_test.go +++ b/cmd/minikube/cmd/delete_test.go @@ -22,6 +22,7 @@ import ( "path/filepath" "testing" + "github.com/spf13/viper" "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/localpath" @@ -73,6 +74,8 @@ func TestDeleteProfileWithValidConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { @@ -121,6 +124,8 @@ func TestDeleteProfileWithEmptyProfileConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { @@ -169,6 +174,8 @@ func TestDeleteProfileWithInvalidProfileConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { @@ -217,6 +224,8 @@ func TestDeleteProfileWithPartialProfileConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { @@ -265,6 +274,8 @@ func TestDeleteProfileWithMissingMachineConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != numberOfMachineDirs { t.Fatal("Deleted a machine config when it should not") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { @@ -313,6 +324,8 @@ func TestDeleteProfileWithEmptyMachineConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { @@ -361,6 +374,8 @@ func TestDeleteProfileWithInvalidMachineConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { @@ -409,6 +424,8 @@ func TestDeleteProfileWithPartialMachineConfig(t *testing.T) { if files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")); len(files) != (numberOfMachineDirs - 1) { t.Fatal("Did not delete exactly one profile") } + + viper.Set(config.MachineProfile, "") } func TestDeleteAllProfiles(t *testing.T) { @@ -471,4 +488,6 @@ func TestDeleteAllProfiles(t *testing.T) { if numberOfMachineDirs != 0 { t.Errorf("Did not delete all profiles: still %d machines left", numberOfMachineDirs) } + + viper.Set(config.MachineProfile, "") } From 280e11880d8e508f3e5b24048de3b6b3df9ebdd3 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 18:32:36 +0200 Subject: [PATCH 48/55] Merge branch 'master' into DELETE_ALL_PROFILES Explicitly unset viper MachineProfile in machine_test --- pkg/minikube/cluster/machine_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index 7c6d6e7262c7..daf308a34d1e 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -17,11 +17,14 @@ limitations under the License. package cluster import ( + "fmt" "io/ioutil" "os" "path/filepath" "testing" + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/localpath" ) @@ -32,6 +35,8 @@ func TestListMachines(t *testing.T) { totalNumberOfMachines = numberOfValidMachines + numberOfInValidMachines ) + viper.Set(config.MachineProfile, "") + testMinikubeDir := "./testdata/machine" miniDir, err := filepath.Abs(testMinikubeDir) @@ -47,6 +52,7 @@ func TestListMachines(t *testing.T) { files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) + fmt.Println("Viper MachineProfile variable: " + viper.GetString(config.MachineProfile)) validMachines, inValidMachines, err := ListMachines() if err != nil { From 8a4b3b942fdb239ec9ac32f6d28965fe313c25c4 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 18:41:49 +0200 Subject: [PATCH 49/55] Added more debug code --- pkg/minikube/cluster/machine_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index daf308a34d1e..c57dde3d997a 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -53,6 +53,9 @@ func TestListMachines(t *testing.T) { numberOfMachineDirs := len(files) fmt.Println("Viper MachineProfile variable: " + viper.GetString(config.MachineProfile)) + fmt.Println("MINIKUBE_HOME: " + os.Getenv(localpath.MinikubeHome)) + fmt.Printf("Files: %v", files) + validMachines, inValidMachines, err := ListMachines() if err != nil { From ae6f47d5627c44ee69418528a8454cb510834b6f Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 21:21:48 +0200 Subject: [PATCH 50/55] Appended "/.minikube" to testMinikubeDir for machine_test --- pkg/minikube/cluster/machine_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index c57dde3d997a..89deaedc98b6 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -37,7 +37,7 @@ func TestListMachines(t *testing.T) { viper.Set(config.MachineProfile, "") - testMinikubeDir := "./testdata/machine" + testMinikubeDir := "./testdata/machine/.minikube" miniDir, err := filepath.Abs(testMinikubeDir) if err != nil { From ee97b87ef92520ab35d56de430ea1cc91bccb88e Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 21:31:28 +0200 Subject: [PATCH 51/55] Added debug code --- pkg/minikube/cluster/machine.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/minikube/cluster/machine.go b/pkg/minikube/cluster/machine.go index 8a24b04e3c66..00556bee171b 100644 --- a/pkg/minikube/cluster/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -17,6 +17,7 @@ limitations under the License. package cluster import ( + "fmt" "io/ioutil" "path/filepath" @@ -67,6 +68,8 @@ func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines } for _, n := range pDirs { p, err := LoadMachine(n) + fmt.Printf("MachineLoadError: %v", err) + if err != nil { inValidMachines = append(inValidMachines, p) continue From b8abe562b378b77d2a68ef83155b7b9a04b49785 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 22:20:47 +0200 Subject: [PATCH 52/55] Added more debug code --- pkg/minikube/machine/client.go | 2 ++ pkg/minikube/registry/registry.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pkg/minikube/machine/client.go b/pkg/minikube/machine/client.go index fdd4f2069f67..3557cf56c7a3 100644 --- a/pkg/minikube/machine/client.go +++ b/pkg/minikube/machine/client.go @@ -19,6 +19,7 @@ package machine import ( "crypto/tls" "encoding/json" + "fmt" "net" "os" "path/filepath" @@ -128,6 +129,7 @@ func (api *LocalClient) Load(name string) (*host.Host, error) { } var def registry.DriverDef + fmt.Println("Searching for driver: " + h.DriverName) if def, err = registry.Driver(h.DriverName); err != nil { return nil, err } else if !def.Builtin || def.DriverCreator == nil { diff --git a/pkg/minikube/registry/registry.go b/pkg/minikube/registry/registry.go index 15b7b15e41e9..296083289029 100644 --- a/pkg/minikube/registry/registry.go +++ b/pkg/minikube/registry/registry.go @@ -133,6 +133,11 @@ func (r *driverRegistry) Driver(name string) (DriverDef, error) { r.lock.Lock() defer r.lock.Unlock() + fmt.Println("Drivers: ") + for _, d := range r.drivers { + fmt.Println(d.Name) + } + if driver, ok := r.drivers[name]; ok { return driver, nil } From 0c9cd491ce6fe79ae0a2c385e1b42e756c454d66 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 3 Oct 2019 22:33:24 +0200 Subject: [PATCH 53/55] Replaced driver "hyperkit" by "virtualbox" in testfiles Removed debug code --- pkg/minikube/cluster/machine.go | 3 --- pkg/minikube/cluster/machine_test.go | 5 ----- .../testdata/machine/.minikube/machines/p1/config.json | 2 +- .../testdata/machine/.minikube/machines/p2/config.json | 2 +- pkg/minikube/machine/client.go | 2 -- pkg/minikube/registry/registry.go | 5 ----- 6 files changed, 2 insertions(+), 17 deletions(-) diff --git a/pkg/minikube/cluster/machine.go b/pkg/minikube/cluster/machine.go index 00556bee171b..8a24b04e3c66 100644 --- a/pkg/minikube/cluster/machine.go +++ b/pkg/minikube/cluster/machine.go @@ -17,7 +17,6 @@ limitations under the License. package cluster import ( - "fmt" "io/ioutil" "path/filepath" @@ -68,8 +67,6 @@ func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines } for _, n := range pDirs { p, err := LoadMachine(n) - fmt.Printf("MachineLoadError: %v", err) - if err != nil { inValidMachines = append(inValidMachines, p) continue diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index 89deaedc98b6..4f5e253f499f 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -17,7 +17,6 @@ limitations under the License. package cluster import ( - "fmt" "io/ioutil" "os" "path/filepath" @@ -52,10 +51,6 @@ func TestListMachines(t *testing.T) { files, _ := ioutil.ReadDir(filepath.Join(localpath.MiniPath(), "machines")) numberOfMachineDirs := len(files) - fmt.Println("Viper MachineProfile variable: " + viper.GetString(config.MachineProfile)) - fmt.Println("MINIKUBE_HOME: " + os.Getenv(localpath.MinikubeHome)) - fmt.Printf("Files: %v", files) - validMachines, inValidMachines, err := ListMachines() if err != nil { diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json index 90a026a01c51..83a27c78b244 100644 --- a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json +++ b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json @@ -23,7 +23,7 @@ "Initrd": "initrd", "Vmlinuz": "bzImage" }, - "DriverName": "hyperkit", + "DriverName": "virtualbox", "HostOptions": { "Driver": "", "Memory": 0, diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json index 3a9813e57d31..4bb1814211cc 100644 --- a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json +++ b/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json @@ -23,7 +23,7 @@ "Initrd": "initrd", "Vmlinuz": "bzImage" }, - "DriverName": "hyperkit", + "DriverName": "virtualbox", "HostOptions": { "Driver": "", "Memory": 0, diff --git a/pkg/minikube/machine/client.go b/pkg/minikube/machine/client.go index 3557cf56c7a3..fdd4f2069f67 100644 --- a/pkg/minikube/machine/client.go +++ b/pkg/minikube/machine/client.go @@ -19,7 +19,6 @@ package machine import ( "crypto/tls" "encoding/json" - "fmt" "net" "os" "path/filepath" @@ -129,7 +128,6 @@ func (api *LocalClient) Load(name string) (*host.Host, error) { } var def registry.DriverDef - fmt.Println("Searching for driver: " + h.DriverName) if def, err = registry.Driver(h.DriverName); err != nil { return nil, err } else if !def.Builtin || def.DriverCreator == nil { diff --git a/pkg/minikube/registry/registry.go b/pkg/minikube/registry/registry.go index 296083289029..15b7b15e41e9 100644 --- a/pkg/minikube/registry/registry.go +++ b/pkg/minikube/registry/registry.go @@ -133,11 +133,6 @@ func (r *driverRegistry) Driver(name string) (DriverDef, error) { r.lock.Lock() defer r.lock.Unlock() - fmt.Println("Drivers: ") - for _, d := range r.drivers { - fmt.Println(d.Name) - } - if driver, ok := r.drivers[name]; ok { return driver, nil } From a0c844e07eb8064c637f7a063c48971fb08394e7 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 10 Oct 2019 21:22:17 +0200 Subject: [PATCH 54/55] Refactor --- pkg/minikube/cluster/machine_test.go | 2 +- .../.minikube/machines/p1/config.json | 0 .../.minikube/machines/p2/config.json | 0 .../.minikube/machines/p3_empty_config/config.json | 0 .../.minikube/machines/p4_invalid_machine_config/config.json | 0 .../.minikube/machines/p5_partial_config/config.json | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename pkg/minikube/cluster/testdata/{machine => list-machines}/.minikube/machines/p1/config.json (100%) rename pkg/minikube/cluster/testdata/{machine => list-machines}/.minikube/machines/p2/config.json (100%) rename pkg/minikube/cluster/testdata/{machine => list-machines}/.minikube/machines/p3_empty_config/config.json (100%) rename pkg/minikube/cluster/testdata/{machine => list-machines}/.minikube/machines/p4_invalid_machine_config/config.json (100%) rename pkg/minikube/cluster/testdata/{machine => list-machines}/.minikube/machines/p5_partial_config/config.json (100%) diff --git a/pkg/minikube/cluster/machine_test.go b/pkg/minikube/cluster/machine_test.go index 4f5e253f499f..a04f40aa8b78 100644 --- a/pkg/minikube/cluster/machine_test.go +++ b/pkg/minikube/cluster/machine_test.go @@ -36,7 +36,7 @@ func TestListMachines(t *testing.T) { viper.Set(config.MachineProfile, "") - testMinikubeDir := "./testdata/machine/.minikube" + testMinikubeDir := "./testdata/list-machines/.minikube" miniDir, err := filepath.Abs(testMinikubeDir) if err != nil { diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json b/pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p1/config.json similarity index 100% rename from pkg/minikube/cluster/testdata/machine/.minikube/machines/p1/config.json rename to pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p1/config.json diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json b/pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p2/config.json similarity index 100% rename from pkg/minikube/cluster/testdata/machine/.minikube/machines/p2/config.json rename to pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p2/config.json diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p3_empty_config/config.json b/pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p3_empty_config/config.json similarity index 100% rename from pkg/minikube/cluster/testdata/machine/.minikube/machines/p3_empty_config/config.json rename to pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p3_empty_config/config.json diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json b/pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p4_invalid_machine_config/config.json similarity index 100% rename from pkg/minikube/cluster/testdata/machine/.minikube/machines/p4_invalid_machine_config/config.json rename to pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p4_invalid_machine_config/config.json diff --git a/pkg/minikube/cluster/testdata/machine/.minikube/machines/p5_partial_config/config.json b/pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p5_partial_config/config.json similarity index 100% rename from pkg/minikube/cluster/testdata/machine/.minikube/machines/p5_partial_config/config.json rename to pkg/minikube/cluster/testdata/list-machines/.minikube/machines/p5_partial_config/config.json From 09ce93faf06ec08c4b17ab302a20a34537daa075 Mon Sep 17 00:00:00 2001 From: Marek Schwarz Date: Thu, 10 Oct 2019 21:32:27 +0200 Subject: [PATCH 55/55] Added delete --all to common.sh Run delete --all after start_stop_delete_test --- hack/jenkins/common.sh | 2 ++ test/integration/start_stop_delete_test.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index e48f34e044b7..c02bdb2cd242 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -108,6 +108,8 @@ for entry in $(ls ${TEST_ROOT}); do sudo rm -Rf "${home}" done + ${MINIKUBE_BIN} delete --all || true + for kconfig in $(find ${entry} -name kubeconfig -type f); do sudo rm -f "${kconfig}" done diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index bf575baeee7f..1ed1f6b676fe 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -139,6 +139,11 @@ func TestStartStop(t *testing.T) { if err != nil { t.Errorf("%s failed: %v", rr.Args, err) } + + rr, err = Run(t, exec.CommandContext(ctx, Target(), "delete", "--all")) + if err != nil { + t.Errorf("%s failed: %v", rr.Args, err) + } }) } })