fix spelling mistake
parent
fb34a99415
commit
bfc26bbdf0
|
|
@ -19,7 +19,7 @@ package config
|
|||
import "testing"
|
||||
|
||||
func TestNotFound(t *testing.T) {
|
||||
err := Set("nonexistant", "10")
|
||||
err := Set("nonexistent", "10")
|
||||
if err == nil {
|
||||
t.Fatalf("Set did not return error for unknown property")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ var minikubeConfig = pkgConfig.MinikubeConfig{
|
|||
}
|
||||
|
||||
func TestFindSettingNotFound(t *testing.T) {
|
||||
s, err := findSetting("nonexistant")
|
||||
s, err := findSetting("nonexistent")
|
||||
if err == nil {
|
||||
t.Fatalf("Shouldn't have found setting, but did. [%+v]", s)
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ func TestFindSetting(t *testing.T) {
|
|||
func TestSetString(t *testing.T) {
|
||||
err := SetString(minikubeConfig, "vm-driver", constants.DriverVirtualbox)
|
||||
if err != nil {
|
||||
t.Fatalf("Couldnt set string: %v", err)
|
||||
t.Fatalf("Couldn't set string: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ func (k *Bootstrapper) LogCommands(o bootstrapper.LogOptions) map[string]string
|
|||
}
|
||||
}
|
||||
|
||||
// createFlagsFromExtraArgs converts kubeadm extra args into flags to be supplied from the commad linne
|
||||
// createFlagsFromExtraArgs converts kubeadm extra args into flags to be supplied from the command linne
|
||||
func createFlagsFromExtraArgs(extraOptions config.ExtraOptionSlice) string {
|
||||
kubeadmExtraOpts := extraOptions.AsMap().Get(Kubeadm)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func TestVersionIsBetween(t *testing.T) {
|
|||
expected: false,
|
||||
},
|
||||
{
|
||||
description: "greather than max version",
|
||||
description: "greater than max version",
|
||||
ver: semver.MustParse("2.8.0"),
|
||||
gte: semver.MustParse("1.7.0"),
|
||||
lte: semver.MustParse("1.9.0"),
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ func TestReadConfig(t *testing.T) {
|
|||
// non existing file
|
||||
mkConfig, err := ReadConfig("non_existing_file")
|
||||
if err != nil {
|
||||
t.Fatalf("Error not exepected but got %v", err)
|
||||
t.Fatalf("Error not expected but got %v", err)
|
||||
}
|
||||
|
||||
if len(mkConfig) != 0 {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ func (cm ComponentExtraOptionMap) Get(component string) map[string]string {
|
|||
}
|
||||
|
||||
// ContainsParam checks if a given slice of strings contains the provided string.
|
||||
// If a modifier func is provided, it is called with the slice item before the comparation.
|
||||
// If a modifier func is provided, it is called with the slice item before the comparison.
|
||||
func ContainsParam(slice []string, s string) bool {
|
||||
for _, item := range slice {
|
||||
if item == s {
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ func TestGetKubeConfigPath(t *testing.T) {
|
|||
for _, test := range tests {
|
||||
os.Setenv(clientcmd.RecommendedConfigPathEnvVar, test.input)
|
||||
if result := PathFromEnv(); result != os.ExpandEnv(test.want) {
|
||||
t.Errorf("Expected first splitted chunk, got: %s", result)
|
||||
t.Errorf("Expected first split chunk, got: %s", result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func TestFromError(t *testing.T) {
|
|||
{0, "", "", "this is just a lame error message with no matches."},
|
||||
{2991, "", "KVM_UNAVAILABLE", "Unable to start VM: create: Error creating machine: Error in driver during machine creation: creating domain: Error defining domain xml:\n\n: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')"},
|
||||
{3594, "", "HOST_CIDR_CONFLICT", "Error starting host: Error starting stopped host: Error setting up host only network on machine start: host-only cidr conflicts with the network address of a host interface."},
|
||||
{3614, "", "VBOX_HOST_ADAPTER", "Error starting host: Error starting stopped host: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue"},
|
||||
{3614, "", "VBOX_HOST_ADAPTER", "Error starting host: Error starting stopped host: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is supposed to fix this issue"},
|
||||
{3784, "", "VBOX_NOT_FOUND", "create: precreate: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"},
|
||||
{3849, "", "IP_NOT_FOUND", "bootstrapper: Error creating new ssh host from driver: Error getting ssh host name for driver: IP not found"},
|
||||
{3859, "windows", "VBOX_HARDENING", `Unable to start VM: create: creating: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
|
||||
|
|
@ -121,7 +121,7 @@ VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
|
|||
{4107, "darwin", "VBOX_BLOCKED", "Result Code: NS_ERROR_FAILURE (0x80004005)"},
|
||||
{4302, "", "APISERVER_TIMEOUT", "apiserver: timed out waiting for the condition"},
|
||||
{4252, "", "DOWNLOAD_TLS_OVERSIZED", "Failed to update cluster: downloading binaries: downloading kubeadm: Error downloading kubeadm v1.14.1: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:\n\nTemporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubeadm: proxyconnect tcp: tls: oversized record received with length 20527"},
|
||||
{4222, "", "VBOX_HOST_ADAPTER", "Unable to start VM: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue"},
|
||||
{4222, "", "VBOX_HOST_ADAPTER", "Unable to start VM: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is supposed to fix this issue"},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.want, func(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ func TestUpdateTransport(t *testing.T) {
|
|||
rt := c.WrapTransport(nil)
|
||||
|
||||
if rt == rc.WrapTransport(transport) {
|
||||
t.Fatalf("Excpected to reuse existing RoundTripper(%v) but found %v", rt, transport)
|
||||
t.Fatalf("Expected to reuse existing RoundTripper(%v) but found %v", rt, transport)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue