Skip to content
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

Don't update survey prompt if survey prompt is not shown to stdout #6192

Merged

Conversation

tejal29
Copy link
Contributor

@tejal29 tejal29 commented Jul 13, 2021

relates to #6166

While looking in to code on when skaffold updates prompt show, i discovered a bug.

  1. Made sure the test failed when we do update the timestamp when std out is not set.
/private/var/folders/gk/s778hvkj0lb0zl95ywvw0snr00cfc0/T/___TestDisplaySurveyForm_in_github_com_GoogleContainerTools_skaffold_pkg_skaffold_survey -test.v -test.paniconexit0 -test.run ^\QTestDisplaySurveyForm\E$
=== RUN   TestDisplaySurveyForm
=== RUN   TestDisplaySurveyForm/std_out
=== RUN   TestDisplaySurveyForm/not_std_out
    survey_test.go:61: unexpected error: not expected to call
--- FAIL: TestDisplaySurveyForm (0.00s)
    --- PASS: TestDisplaySurveyForm/std_out (0.00s)
    --- FAIL: TestDisplaySurveyForm/not_std_out (0.00s)

FAIL

Process finished with exit code 1

@tejal29 tejal29 requested a review from a team as a code owner July 13, 2021 04:18
@tejal29 tejal29 requested a review from aaron-prindle July 13, 2021 04:18
@google-cla google-cla bot added the cla: yes label Jul 13, 2021
@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #6192 (6c9ca99) into master (db90d38) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6192   +/-   ##
=======================================
  Coverage   71.08%   71.08%           
=======================================
  Files         485      485           
  Lines       21603    21604    +1     
=======================================
+ Hits        15356    15357    +1     
  Misses       5264     5264           
  Partials      983      983           
Impacted Files Coverage Δ
pkg/skaffold/survey/survey.go 58.06% <100.00%> (+1.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db90d38...6c9ca99. Read the comment docs.

description string
mockSurveyPrompted func(_ string) error
expected string
mockStdOut bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak: mockStdOut should go above expected since it's a test input

@briandealwis briandealwis merged commit c14e562 into GoogleContainerTools:master Jul 13, 2021
@tejal29 tejal29 deleted the fix_update_timestamp branch July 21, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants