Fix compile error in setup experience script test - #49812
Conversation
setup_experience_test.go:350 still used the old SetSetupExperienceScript mock signature after it changed to return (bool, error), which broke compilation of the ee/server/service test package on main and failed the lint and test-go (main) jobs on all open PRs.
|
Closing — another team member already has a fix for this main breakage in flight. Closing to avoid a duplicate PR. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated the setup experience test’s Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #49812 +/- ##
==========================================
+ Coverage 67.44% 67.90% +0.45%
==========================================
Files 3903 3903
Lines 249206 249206
Branches 13301 13301
==========================================
+ Hits 168079 169218 +1139
+ Misses 65863 64749 -1114
+ Partials 15264 15239 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Related issue: N/A — fixes a compile break on
main.Description
maincurrently fails to compile theee/server/servicetest package, which turns thelint,lint-incremental, andtest-go (main)jobs red on all open PRs.The
SetSetupExperienceScriptdatastore method was changed to return(changed bool, err error)(commit fbccb8c). The interface, the generated mock, and two of the three mock assignments insetup_experience_test.gowere updated, but the assignment on line 350 was missed:This updates that remaining assignment to the new signature, matching lines 252 and 329.
Testing
go vet ./ee/server/service/passes.SetSetupExperienceScriptFuncassignments use the old signature.Checklist for submitter
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.Testing
Summary by CodeRabbit