-
Notifications
You must be signed in to change notification settings - Fork 31
Refac/stackitcli 286 mv assume yes into printer #1217
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
base: main
Are you sure you want to change the base?
Refac/stackitcli 286 mv assume yes into printer #1217
Conversation
Merging this branch changes the coverage (2 decrease, 228 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
| // Returns nil only if the user (explicitly) answers positive. | ||
| // Returns ErrAborted if the user answers negative. | ||
| func (p *Printer) PromptForConfirmation(prompt string) error { | ||
| if p.AssumeYes { |
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.
Maybe you can also adjust the tests here?
stackit-cli/internal/pkg/print/print_test.go
Line 505 in 62b8c64
| func TestPromptForConfirmation(t *testing.T) { |
Description
relates to #1084
Preparation for fixing #1084, moved the AssumeYes check into PromptForConfirmation/Enter functions in printer.
Review Notes:
I tried to split the PR into more digestible pieces. I suggest to view each commit separately.
Checklist
make fmtmake generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)