-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring of plan_status and first unit tests #1091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit and 🚢
pkg/kudoctl/cmd/plan.go
Outdated
}, | ||
} | ||
|
||
statusCmd.Flags().StringVar(&options.Instance, "instance", "", "The instance name available from 'kubectl get instances'") | ||
if err := statusCmd.MarkFlagRequired("instance"); err != nil { | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't panic much. wdyt about:
panic(err) | |
clog.V(0).Print("failed to makr --instance flag as required: %v", err) | |
os.Exit(1) |
pkg/kudoctl/cmd/plan.go
Outdated
}, | ||
} | ||
|
||
statusCmd.Flags().StringVar(&options.Instance, "instance", "", "The instance name available from 'kubectl get instances'") | ||
if err := statusCmd.MarkFlagRequired("instance"); err != nil { | ||
clog.Printf("failed to make --instance flag as required: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clog.Printf("failed to make --instance flag as required: %v", err) | |
clog.Printf("failed to mark --instance flag as required: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you :)
What this PR does / why we need it:
This is follow-up of #1050
It stops using dynamicclient in this command and introduces first unit tests for the output.
This PR does not aim to add full test coverage for that command but from that point on, it will be easier to add tests when needed.