Skip to content

Commit

Permalink
Fix Xray curation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Nov 5, 2023
1 parent c9165bf commit f00d90e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,12 @@ func curationServer(t *testing.T, expectedRequest map[string]bool, requestToFail
}
}
if r.Method == http.MethodGet {
if r.RequestURI == "/api/system/version" {
w.Write([]byte(`{"version": "7.0.0"}`))

Check failure on line 918 in xray_test.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

Error return value of `w.Write` is not checked (errcheck)
w.WriteHeader(http.StatusOK)
return
}

if _, exist := requestToFail[r.RequestURI]; exist {
w.WriteHeader(http.StatusForbidden)
_, err := w.Write([]byte("{\n \"errors\": [\n {\n \"status\": 403,\n " +
Expand Down

0 comments on commit f00d90e

Please sign in to comment.