Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #40143 +/- ##
==========================================
+ Coverage 66.31% 66.34% +0.02%
==========================================
Files 2449 2452 +3
Lines 196520 196719 +199
Branches 8537 8537
==========================================
+ Hits 130332 130505 +173
- Misses 54379 54398 +19
- Partials 11809 11816 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| listResp = listHostsResponse{} | ||
| s.DoJSON("GET", "/api/latest/fleet/hosts", nil, http.StatusOK, &listResp, "software_status", "installed", "team_id", fmt.Sprint(team.ID), | ||
| "software_title_id", fmt.Sprint(app2TitleID), "order_key", "h.id") | ||
| "software_title_id", fmt.Sprint(app2TitleID), "order_key", "id") |
There was a problem hiding this comment.
pointing this out as technically a breaking change, although I don't expect customers or the FE to use h.id
getvictor
left a comment
There was a problem hiding this comment.
Looks good overall. Left a couple small comments.
| require.NoError(t, err) | ||
| expected := "SELECT * FROM my_table ORDER BY name ASC LIMIT 1000000" | ||
| if actual != expected { | ||
| t.Errorf("got %q, want %q", actual, expected) |
There was a problem hiding this comment.
We should be using testify assert/require here, and other places.
| Allowed []string | ||
| } | ||
|
|
||
| func (e InvalidOrderKeyError) Error() string { |
There was a problem hiding this comment.
What error code will this return?
Can it implement IsClientError() = true interface?
There was a problem hiding this comment.
good catch, i also implemented Invalid() so this gets surfaced as a 422 err
Related issue: Resolves https://github.com/fleetdm/confidential/issues/14323
Entpoints affected | sensitive data:
Checklist for submitter
If some of the following don't apply, delete the relevant line.
Changes file added for user-visible changes in
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Input data is properly validated,
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements)If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes
Testing
Added/updated automated tests
QA'd all new/changed functionality manually