commit
98ff78a762
|
@ -73,13 +73,13 @@ func ProfileExists(name string, miniHome ...string) bool {
|
|||
return err == nil
|
||||
}
|
||||
|
||||
// CreateEmptyProfile creates an empty profile stores in $MINIKUBE_HOME/profiles/<profilename>/config.json
|
||||
// CreateEmptyProfile creates an empty profile and stores in $MINIKUBE_HOME/profiles/<profilename>/config.json
|
||||
func CreateEmptyProfile(name string, miniHome ...string) error {
|
||||
cfg := &MachineConfig{}
|
||||
return CreateProfile(name, cfg, miniHome...)
|
||||
}
|
||||
|
||||
// CreateProfile creates an profile out of the cfg and stores in $MINIKUBE_HOME/profiles/<profilename>/config.json
|
||||
// CreateProfile creates a profile out of the cfg and stores in $MINIKUBE_HOME/profiles/<profilename>/config.json
|
||||
func CreateProfile(name string, cfg *MachineConfig, miniHome ...string) error {
|
||||
data, err := json.MarshalIndent(cfg, "", " ")
|
||||
if err != nil {
|
||||
|
@ -181,7 +181,7 @@ func profileDirs(miniHome ...string) (dirs []string, err error) {
|
|||
return dirs, err
|
||||
}
|
||||
|
||||
// profileFilePath returns the Minikube profile config file
|
||||
// profileFilePath returns path of profile config file
|
||||
func profileFilePath(profile string, miniHome ...string) string {
|
||||
miniPath := localpath.MiniPath()
|
||||
if len(miniHome) > 0 {
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
// TestListProfiles uses a different uses different MINIKUBE_HOME with rest of tests since it relies on file list index
|
||||
// TestListProfiles uses a different MINIKUBE_HOME with rest of tests since it relies on file list index
|
||||
func TestListProfiles(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/profile/.minikube")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue