Fix group code coverage csv
Ref: #270102 (closed)
What does this MR do?
This MR fixes a bug to download the group code coverage data as a csv.
Why are we doing this?
After !49630 (merged) was shipped I was making sure we fixed our existing ~bug correctly and discovered something wrong with the way our params was structured with our HTTP request.
Before
[1] pry(#<Groups::Analytics::CoverageReportsController>)> params
=> <ActionController::Parameters {"controller"=>"groups/analytics/coverage_reports", "action"=>"index", "group_id"=>"gitlab-org", "format"=>"csv&start_date=2020-11-16&end_date=2020-12-16&project_ids[]=2"} permitted: false>
After
[1] pry(#<Groups::Analytics::CoverageReportsController>)> params
=> <ActionController::Parameters {"ref_path"=>"", "start_date"=>"2020-11-16", "end_date"=>"2020-12-16", "project_ids"=>["2"], "controller"=>"groups/analytics/coverage_reports", "action"=>"index", "group_id"=>"gitlab-org", "format"=>"csv"} permitted: false>
Screenshots (strongly suggested)
This MR make sure we are able to download raw group code coverage data as a csv.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team