Fix linting issues
This commit is contained in:
parent
1d624fb05f
commit
97280aa62d
@ -37,12 +37,14 @@ func executeCmd(t *testing.T, command string) {
|
||||
args := strings.Fields(command)
|
||||
rootCmd.SetArgs(args)
|
||||
|
||||
rootCmd.Execute()
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
t.Fatalf(err.Error())
|
||||
}
|
||||
|
||||
goldenFilePath := filepath.Join(goldenFileDir, filepath.FromSlash(t.Name())+".golden")
|
||||
if *updateGolden {
|
||||
t.Logf("updating golden file: %s", goldenFilePath)
|
||||
if err := ioutil.WriteFile(goldenFilePath, actual.Bytes(), 0644); err != nil {
|
||||
if err := ioutil.WriteFile(goldenFilePath, normalize(actual.Bytes()), 0644); err != nil {
|
||||
t.Fatalf("failed to update golden file: %s", err)
|
||||
}
|
||||
return
|
||||
|
@ -16,7 +16,10 @@ func GetClient() *kubernetes.Clientset {
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
kubeconfig = flag.String("kubeconfig", filepath.Join(home, ".kube", "config"), "(optional) absolute path to the kubeconfig file")
|
||||
// TODO(howell): This was example code. The flag parsing needs to be
|
||||
// moved to a command
|
||||
fp := filepath.Join(home, ".kube", "config")
|
||||
kubeconfig = flag.String("kubeconfig", fp, "(optional) absolute path to the kubeconfig file")
|
||||
flag.Parse()
|
||||
|
||||
// use the current context in kubeconfig
|
||||
|
Loading…
x
Reference in New Issue
Block a user