mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Fixed code formatting issues discovered by verify-gofmt
This commit is contained in:
parent
97185e9752
commit
2d21f16c38
@ -101,31 +101,31 @@ func TestPluginPathsAreValid(t *testing.T) {
|
|||||||
expectOut string
|
expectOut string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "ensure no plugins found if no files begin with kubectl- prefix",
|
name: "ensure no plugins found if no files begin with kubectl- prefix",
|
||||||
pluginPaths: []string{tempDir},
|
pluginPaths: []string{tempDir},
|
||||||
verifier: newFakePluginPathVerifier(),
|
verifier: newFakePluginPathVerifier(),
|
||||||
pluginFile: func() (*os.File, error) {
|
pluginFile: func() (*os.File, error) {
|
||||||
return ioutil.TempFile(tempDir, "notkubectl-")
|
return ioutil.TempFile(tempDir, "notkubectl-")
|
||||||
},
|
},
|
||||||
expectErr: "error: unable to find any kubectl plugins in your PATH\n",
|
expectErr: "error: unable to find any kubectl plugins in your PATH\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ensure de-duplicated plugin-paths slice",
|
name: "ensure de-duplicated plugin-paths slice",
|
||||||
pluginPaths: []string{tempDir, tempDir},
|
pluginPaths: []string{tempDir, tempDir},
|
||||||
verifier: newFakePluginPathVerifier(),
|
verifier: newFakePluginPathVerifier(),
|
||||||
pluginFile: func() (*os.File, error) {
|
pluginFile: func() (*os.File, error) {
|
||||||
return ioutil.TempFile(tempDir, "kubectl-")
|
return ioutil.TempFile(tempDir, "kubectl-")
|
||||||
},
|
},
|
||||||
expectOut: "The following compatible plugins are available:",
|
expectOut: "The following compatible plugins are available:",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ensure no errors when empty string or blank path are specified",
|
name: "ensure no errors when empty string or blank path are specified",
|
||||||
pluginPaths: []string{tempDir, "", " "},
|
pluginPaths: []string{tempDir, "", " "},
|
||||||
verifier: newFakePluginPathVerifier(),
|
verifier: newFakePluginPathVerifier(),
|
||||||
pluginFile: func() (*os.File, error) {
|
pluginFile: func() (*os.File, error) {
|
||||||
return ioutil.TempFile(tempDir, "kubectl-")
|
return ioutil.TempFile(tempDir, "kubectl-")
|
||||||
},
|
},
|
||||||
expectOut: "The following compatible plugins are available:",
|
expectOut: "The following compatible plugins are available:",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user