Adding separate test data for create_delete profile
parent
36048225c0
commit
cd11b0c41c
|
@ -21,6 +21,7 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
// TestListProfiles uses a different uses different MINIKUBE_HOME with rest of tests since it relies on file list index
|
||||
func TestListProfiles(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube")
|
||||
if err != nil {
|
||||
|
@ -71,8 +72,9 @@ func TestListProfiles(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func TestProfileExists(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube")
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube2")
|
||||
if err != nil {
|
||||
t.Errorf("error getting dir path for ./testdata/.minikube : %v", err)
|
||||
}
|
||||
|
@ -99,7 +101,7 @@ func TestProfileExists(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCreateEmptyProfile(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube")
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube2")
|
||||
if err != nil {
|
||||
t.Errorf("error getting dir path for ./testdata/.minikube : %v", err)
|
||||
}
|
||||
|
@ -130,7 +132,7 @@ func TestCreateEmptyProfile(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCreateProfile(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube")
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube2")
|
||||
if err != nil {
|
||||
t.Errorf("error getting dir path for ./testdata/.minikube : %v", err)
|
||||
}
|
||||
|
@ -166,7 +168,7 @@ func TestCreateProfile(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDeleteProfile(t *testing.T) {
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube")
|
||||
miniDir, err := filepath.Abs("./testdata/.minikube2")
|
||||
if err != nil {
|
||||
t.Errorf("error getting dir path for ./testdata/.minikube : %v", err)
|
||||
}
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"MachineConfig": {
|
||||
"KeepContext": false,
|
||||
"MinikubeISO": "",
|
||||
"Memory": 0,
|
||||
"CPUs": 0,
|
||||
"DiskSize": 0,
|
||||
"VMDriver": "",
|
||||
"ContainerRuntime": "",
|
||||
"HyperkitVpnKitSock": "",
|
||||
"HyperkitVSockPorts": null,
|
||||
"DockerEnv": null,
|
||||
"InsecureRegistry": null,
|
||||
"RegistryMirror": null,
|
||||
"HostOnlyCIDR": "",
|
||||
"HypervVirtualSwitch": "",
|
||||
"KVMNetwork": "",
|
||||
"KVMQemuURI": "",
|
||||
"KVMGPU": false,
|
||||
"KVMHidden": false,
|
||||
"DockerOpt": null,
|
||||
"DisableDriverMounts": false,
|
||||
"NFSShare": null,
|
||||
"NFSSharesRoot": "",
|
||||
"UUID": "",
|
||||
"NoVTXCheck": false,
|
||||
"DNSProxy": false,
|
||||
"HostDNSResolver": false
|
||||
},
|
||||
"KubernetesConfig": {
|
||||
"KubernetesVersion": "",
|
||||
"NodeIP": "",
|
||||
"NodePort": 0,
|
||||
"NodeName": "",
|
||||
"APIServerName": "",
|
||||
"APIServerNames": null,
|
||||
"APIServerIPs": null,
|
||||
"DNSDomain": "",
|
||||
"ContainerRuntime": "",
|
||||
"CRISocket": "",
|
||||
"NetworkPlugin": "",
|
||||
"FeatureGates": "",
|
||||
"ServiceCIDR": "",
|
||||
"ImageRepository": "",
|
||||
"ExtraOptions": null,
|
||||
"ShouldLoadCachedImages": false,
|
||||
"EnableDefaultCNI": false
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"MachineConfig": {
|
||||
"KeepContext": false,
|
||||
"MinikubeISO": "",
|
||||
"Memory": 0,
|
||||
"CPUs": 0,
|
||||
"DiskSize": 0,
|
||||
"VMDriver": "",
|
||||
"ContainerRuntime": "",
|
||||
"HyperkitVpnKitSock": "",
|
||||
"HyperkitVSockPorts": null,
|
||||
"DockerEnv": null,
|
||||
"InsecureRegistry": null,
|
||||
"RegistryMirror": null,
|
||||
"HostOnlyCIDR": "",
|
||||
"HypervVirtualSwitch": "",
|
||||
"KVMNetwork": "",
|
||||
"KVMQemuURI": "",
|
||||
"KVMGPU": false,
|
||||
"KVMHidden": false,
|
||||
"DockerOpt": null,
|
||||
"DisableDriverMounts": false,
|
||||
"NFSShare": null,
|
||||
"NFSSharesRoot": "",
|
||||
"UUID": "",
|
||||
"NoVTXCheck": false,
|
||||
"DNSProxy": false,
|
||||
"HostDNSResolver": false
|
||||
},
|
||||
"KubernetesConfig": {
|
||||
"KubernetesVersion": "",
|
||||
"NodeIP": "",
|
||||
"NodePort": 0,
|
||||
"NodeName": "",
|
||||
"APIServerName": "",
|
||||
"APIServerNames": null,
|
||||
"APIServerIPs": null,
|
||||
"DNSDomain": "",
|
||||
"ContainerRuntime": "",
|
||||
"CRISocket": "",
|
||||
"NetworkPlugin": "",
|
||||
"FeatureGates": "",
|
||||
"ServiceCIDR": "",
|
||||
"ImageRepository": "",
|
||||
"ExtraOptions": null,
|
||||
"ShouldLoadCachedImages": false,
|
||||
"EnableDefaultCNI": false
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"MachineConfig": {
|
||||
"KeepContext": false,
|
||||
"MinikubeISO": "",
|
||||
"Memory": 0,
|
||||
"CPUs": 0,
|
||||
"DiskSize": 0,
|
||||
"VMDriver": "",
|
||||
"ContainerRuntime": "",
|
||||
"HyperkitVpnKitSock": "",
|
||||
"HyperkitVSockPorts": null,
|
||||
"DockerEnv": null,
|
||||
"InsecureRegistry": null,
|
||||
"RegistryMirror": null,
|
||||
"HostOnlyCIDR": "",
|
||||
"HypervVirtualSwitch": "",
|
||||
"KVMNetwork": "",
|
||||
"KVMQemuURI": "",
|
||||
"KVMGPU": false,
|
||||
"KVMHidden": false,
|
||||
"DockerOpt": null,
|
||||
"DisableDriverMounts": false,
|
||||
"NFSShare": null,
|
||||
"NFSSharesRoot": "",
|
||||
"UUID": "",
|
||||
"NoVTXCheck": false,
|
||||
"DNSProxy": false,
|
||||
"HostDNSResolver": false
|
||||
},
|
||||
"KubernetesConfig": {
|
||||
"KubernetesVersion": "",
|
||||
"NodeIP": "",
|
||||
"NodePort": 0,
|
||||
"NodeName": "",
|
||||
"APIServerName": "",
|
||||
"APIServerNames": null,
|
||||
"APIServerIPs": null,
|
||||
"DNSDomain": "",
|
||||
"ContainerRuntime": "",
|
||||
"CRISocket": "",
|
||||
"NetworkPlugin": "",
|
||||
"FeatureGates": "",
|
||||
"ServiceCIDR": "",
|
||||
"ImageRepository": "",
|
||||
"ExtraOptions": null,
|
||||
"ShouldLoadCachedImages": false,
|
||||
"EnableDefaultCNI": false
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
invalid json file :)
|
47
pkg/minikube/config/testdata/.minikube2/profiles/p5_partial_config/config.json
vendored
Normal file
47
pkg/minikube/config/testdata/.minikube2/profiles/p5_partial_config/config.json
vendored
Normal file
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue